sio.c (88900) | sio.c (89447) |
---|---|
1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/dev/sio/sio.c 88900 2002-01-05 08:47:13Z jhb $ | 33 * $FreeBSD: head/sys/dev/sio/sio.c 89447 2002-01-17 06:21:45Z bmah $ |
34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 35 * from: i386/isa sio.c,v 1.234 36 */ 37 38#include "opt_comconsole.h" 39#include "opt_compat.h" 40#include "opt_ddb.h" 41#include "opt_sio.h" --- 719 unchanged lines hidden (view full) --- 761 mtx_unlock_spin(&sio_lock); 762 763 irqs = irqmap[1] & ~irqmap[0]; 764 if (bus_get_resource(idev, SYS_RES_IRQ, 0, &xirq, NULL) == 0 && 765 ((1 << xirq) & irqs) == 0) 766 printf( 767 "sio%d: configured irq %ld not in bitmap of probed irqs %#x\n", 768 device_get_unit(dev), xirq, irqs); | 34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 35 * from: i386/isa sio.c,v 1.234 36 */ 37 38#include "opt_comconsole.h" 39#include "opt_compat.h" 40#include "opt_ddb.h" 41#include "opt_sio.h" --- 719 unchanged lines hidden (view full) --- 761 mtx_unlock_spin(&sio_lock); 762 763 irqs = irqmap[1] & ~irqmap[0]; 764 if (bus_get_resource(idev, SYS_RES_IRQ, 0, &xirq, NULL) == 0 && 765 ((1 << xirq) & irqs) == 0) 766 printf( 767 "sio%d: configured irq %ld not in bitmap of probed irqs %#x\n", 768 device_get_unit(dev), xirq, irqs); |
769 printf( 770 "sio%d: port may not be enabled in BIOS\n", 771 device_get_unit(dev)); |
|
769 if (bootverbose) 770 printf("sio%d: irq maps: %#x %#x %#x %#x\n", 771 device_get_unit(dev), 772 irqmap[0], irqmap[1], irqmap[2], irqmap[3]); 773 774 result = 0; 775 for (fn = 0; fn < sizeof failures; ++fn) 776 if (failures[fn]) { --- 197 unchanged lines hidden (view full) --- 974 975 scr = sio_getreg(com, com_scr); 976 sio_setreg(com, com_scr, 0xa5); 977 scr1 = sio_getreg(com, com_scr); 978 sio_setreg(com, com_scr, 0x5a); 979 scr2 = sio_getreg(com, com_scr); 980 sio_setreg(com, com_scr, scr); 981 if (scr1 != 0xa5 || scr2 != 0x5a) { | 772 if (bootverbose) 773 printf("sio%d: irq maps: %#x %#x %#x %#x\n", 774 device_get_unit(dev), 775 irqmap[0], irqmap[1], irqmap[2], irqmap[3]); 776 777 result = 0; 778 for (fn = 0; fn < sizeof failures; ++fn) 779 if (failures[fn]) { --- 197 unchanged lines hidden (view full) --- 977 978 scr = sio_getreg(com, com_scr); 979 sio_setreg(com, com_scr, 0xa5); 980 scr1 = sio_getreg(com, com_scr); 981 sio_setreg(com, com_scr, 0x5a); 982 scr2 = sio_getreg(com, com_scr); 983 sio_setreg(com, com_scr, scr); 984 if (scr1 != 0xa5 || scr2 != 0x5a) { |
982 printf(" 8250"); | 985 printf(" 8250 or not responding"); |
983 goto determined_type; 984 } 985 } 986 sio_setreg(com, com_fifo, FIFO_ENABLE | FIFO_RX_HIGH); 987 DELAY(100); 988 com->st16650a = 0; 989 switch (inb(com->int_id_port) & IIR_FIFO_MASK) { 990 case FIFO_RX_LOW: --- 2163 unchanged lines hidden --- | 986 goto determined_type; 987 } 988 } 989 sio_setreg(com, com_fifo, FIFO_ENABLE | FIFO_RX_HIGH); 990 DELAY(100); 991 com->st16650a = 0; 992 switch (inb(com->int_id_port) & IIR_FIFO_MASK) { 993 case FIFO_RX_LOW: --- 2163 unchanged lines hidden --- |