summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio/sio.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1999-09-01 20:53:43 +0000
committerdfr <dfr@FreeBSD.org>1999-09-01 20:53:43 +0000
commitf351c4f3dc1d761f44335d85fee57eb133919756 (patch)
treef5d858916a67aca8a86dac46559341c270c6d087 /sys/dev/sio/sio.c
parentc93ae1166c126cfb59736d68f475ad5948708da7 (diff)
downloadFreeBSD-src-f351c4f3dc1d761f44335d85fee57eb133919756.zip
FreeBSD-src-f351c4f3dc1d761f44335d85fee57eb133919756.tar.gz
This represents essentially a complete rewrite of the ISA PnP code. The
new system is integrated with the ISA bus code more cleanly and allows the future addition of more enumerators such as PnPBIOS and ACPI. This commit also enables the new pcm driver since it is somewhat tied to the new PnP code.
Diffstat (limited to 'sys/dev/sio/sio.c')
-rw-r--r--sys/dev/sio/sio.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 0cd84ba..503aa3e 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -577,6 +577,15 @@ card_intr(struct pccard_devinfo *devi)
#define SET_FLAG(dev, bit) isa_set_flags(dev, isa_get_flags(dev) | (bit))
#define CLR_FLAG(dev, bit) isa_set_flags(dev, isa_get_flags(dev) & ~(bit))
+static struct isa_pnp_id sio_ids[] = {
+ {0x0005d041, "Standard PC COM port"}, /* PNP0500 */
+ {0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */
+ {0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */
+ {0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */
+ {0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */
+ {0}
+};
+
static int
sioprobe(dev)
device_t dev;
@@ -596,10 +605,7 @@ sioprobe(dev)
struct resource *port;
/* Check isapnp ids */
- if (isa_get_vendorid(dev)
- && isa_get_compatid(dev) != PNP_EISAID("PNP0500")
- && isa_get_compatid(dev) != PNP_EISAID("PNP0501")
- && isa_get_compatid(dev) != PNP_EISAID("PNP0502"))
+ if (ISA_PNP_PROBE(device_get_parent(dev), dev, sio_ids) == ENXIO)
return (ENXIO);
rid = 0;
@@ -2628,11 +2634,12 @@ static cn_putc_t siocnputc;
#ifdef __i386__
CONS_DRIVER(sio, siocnprobe, siocninit, NULL, siocngetc, siocncheckc, siocnputc);
+#endif
+
/* To get the GDB related variables */
#if DDB > 0
#include <ddb/ddb.h>
#endif
-#endif
static void
siocntxwait(iobase)
@@ -2830,17 +2837,15 @@ siocnprobe(cp)
siocniobase = iobase;
siocnunit = unit;
}
- if (COM_DEBUGGER(flags) && !COM_LLCONSOLE(flags)) {
+ if (COM_DEBUGGER(flags)) {
printf("sio%d: gdb debugging port\n", unit);
siogdbiobase = iobase;
siogdbunit = unit;
-#ifdef __i386__
#if DDB > 0
gdbdev = makedev(CDEV_MAJOR, unit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
-#endif
}
}
}
OpenPOWER on IntegriCloud