diff options
-rw-r--r-- | sys/amd64/isa/isa.c | 7 | ||||
-rw-r--r-- | sys/i386/isa/isa.c | 7 | ||||
-rw-r--r-- | sys/isa/isa_common.c | 11 | ||||
-rw-r--r-- | sys/isa/isa_common.h | 2 |
4 files changed, 21 insertions, 6 deletions
diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index bf1ae4e..dc39a31 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -59,7 +59,9 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/bus.h> +#include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/module.h> #include <machine/bus.h> #include <sys/rman.h> @@ -157,3 +159,8 @@ isa_teardown_intr(device_t bus, device_t child, struct resource *r, { return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); } + +/* + * On this platform, isa can also attach to the legacy bus. + */ +DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0); diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c index f09428f..ecb22b8 100644 --- a/sys/i386/isa/isa.c +++ b/sys/i386/isa/isa.c @@ -62,7 +62,9 @@ __FBSDID("$FreeBSD$"); #endif #include <sys/param.h> #include <sys/bus.h> +#include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/module.h> #include <machine/bus.h> #include <sys/rman.h> #ifdef PC98 @@ -275,3 +277,8 @@ isa_teardown_intr(device_t bus, device_t child, struct resource *r, { return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); } + +/* + * On this platform, isa can also attach to the legacy bus. + */ +DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0); diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 4ff08d1..b6a8afe 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -81,7 +81,6 @@ static int isa_print_child(device_t bus, device_t dev); static MALLOC_DEFINE(M_ISADEV, "isadev", "ISA device"); -static devclass_t isa_devclass; static int isa_running; /* @@ -1097,20 +1096,20 @@ static device_method_t isa_methods[] = { { 0, 0 } }; -static driver_t isa_driver = { +driver_t isa_driver = { "isa", isa_methods, 1, /* no softc */ }; +devclass_t isa_devclass; + /* - * ISA can be attached to a PCI-ISA bridge or directly to the legacy device. + * ISA can be attached to a PCI-ISA bridge, or other locations on some + * platforms. */ DRIVER_MODULE(isa, isab, isa_driver, isa_devclass, 0, 0); DRIVER_MODULE(isa, eisab, isa_driver, isa_devclass, 0, 0); -#if defined(__i386__) || defined(__amd64__) -DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0); -#endif MODULE_VERSION(isa, 1); /* diff --git a/sys/isa/isa_common.h b/sys/isa/isa_common.h index e17e82b..65e0ad5 100644 --- a/sys/isa/isa_common.h +++ b/sys/isa/isa_common.h @@ -77,3 +77,5 @@ extern int isa_teardown_intr(device_t bus, device_t child, struct resource *r, void *cookie); #endif +extern driver_t isa_driver; +extern devclass_t isa_devclass; |