Get rid of #ifdef for legacy system. Move that into the MD code.

Export minimal symbols to allow this to happen.
This commit is contained in:
Warner Losh 2004-12-24 23:03:17 +00:00
parent 09aafea1c6
commit 812fb8f294
4 changed files with 21 additions and 6 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);
/*

View File

@ -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;