diff options
author | imp <imp@FreeBSD.org> | 2004-12-07 05:30:02 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2004-12-07 05:30:02 +0000 |
commit | efea860c4db3921a3439bc51884aee1bba29f1b5 (patch) | |
tree | c925ccf77e1760b7d1e29afe3346453816eadf52 | |
parent | 1d9d717d90bc5f2ce231923df922057f25ce332f (diff) | |
download | FreeBSD-src-efea860c4db3921a3439bc51884aee1bba29f1b5.zip FreeBSD-src-efea860c4db3921a3439bc51884aee1bba29f1b5.tar.gz |
PNP BIOS devices are fundamentally different than ISA PNP devices.
These devices should be probed first because they are at fixed
locations and cannot be turned off. ISA PNP devices, on the other
hand, can be turned off and often can be flexible in the resources
they use. Probe them last, as always.
-rw-r--r-- | sys/dev/sound/isa/es1888.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/bios.c | 2 | ||||
-rw-r--r-- | sys/isa/isavar.h | 17 | ||||
-rw-r--r-- | sys/sparc64/isa/isa.c | 2 |
4 files changed, 12 insertions, 11 deletions
diff --git a/sys/dev/sound/isa/es1888.c b/sys/dev/sound/isa/es1888.c index 22e1bb0..24830a2 100644 --- a/sys/dev/sound/isa/es1888.c +++ b/sys/dev/sound/isa/es1888.c @@ -148,7 +148,7 @@ es1888_identify(driver_t *driver, device_t parent) /* * Create the device and program its resources. */ - dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNP, NULL, -1); + dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNPBIOS, NULL, -1); bus_set_resource(dev, SYS_RES_IOPORT, 0, 0x220, 0x10); bus_set_resource(dev, SYS_RES_IRQ, 0, 5, 1); bus_set_resource(dev, SYS_RES_DRQ, 0, 1, 1); diff --git a/sys/i386/i386/bios.c b/sys/i386/i386/bios.c index 3bee94f..ca434cb 100644 --- a/sys/i386/i386/bios.c +++ b/sys/i386/i386/bios.c @@ -611,7 +611,7 @@ pnpbios_identify(driver_t *driver, device_t parent) continue; /* Add the device and parse its resources */ - dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNP, NULL, -1); + dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNPBIOS, NULL, -1); isa_set_vendorid(dev, pd->devid); isa_set_logicalid(dev, pd->devid); /* diff --git a/sys/isa/isavar.h b/sys/isa/isavar.h index 811a721..57fad23 100644 --- a/sys/isa/isavar.h +++ b/sys/isa/isavar.h @@ -39,15 +39,16 @@ typedef void isa_config_cb(void *arg, struct isa_config *config, int enable); #ifdef _KERNEL /* - * ISA devices are partially ordered to ensure that devices which are - * sensitive to other driver probe routines are probed first. Plug and - * Play devices are added after devices with speculative probes so that - * the legacy hardware can claim resources allowing the Plug and Play - * hardware to choose different resources. + * ISA devices are partially ordered. This is to ensure that hardwired + * devices the BIOS tells us are there appear first, then speculative + * devices that are sensitive to the probe order, then devices that + * are hinted to be there, then the most flexible devices which support + * the ISA bus PNP standard. */ -#define ISA_ORDER_SENSITIVE 0 /* legacy sensitive hardware */ -#define ISA_ORDER_SPECULATIVE 1 /* legacy non-sensitive hardware */ -#define ISA_ORDER_PNP 2 /* plug-and-play hardware */ +#define ISA_ORDER_PNPBIOS 10 /* plug-and-play BIOS inflexible hardware */ +#define ISA_ORDER_SENSITIVE 20 /* legacy sensitive hardware */ +#define ISA_ORDER_SPECULATIVE 30 /* legacy non-sensitive hardware */ +#define ISA_ORDER_PNP 40 /* plug-and-play hardware */ /* * Limits on resources that we can manage diff --git a/sys/sparc64/isa/isa.c b/sys/sparc64/isa/isa.c index 229af40..b849dfc 100644 --- a/sys/sparc64/isa/isa.c +++ b/sys/sparc64/isa/isa.c @@ -217,7 +217,7 @@ isa_setup_children(device_t dev, phandle_t parent) continue; } - if ((cdev = BUS_ADD_CHILD(dev, ISA_ORDER_PNP, NULL, -1)) == + if ((cdev = BUS_ADD_CHILD(dev, ISA_ORDER_PNPBIOS, NULL, -1)) == NULL) panic("isa_setup_children: BUS_ADD_CHILD failed"); isa_set_logicalid(cdev, pnp_map[i].id); |