diff options
author | kato <kato@FreeBSD.org> | 2000-06-28 03:18:51 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 2000-06-28 03:18:51 +0000 |
commit | ca048afcef64a9f537f75d68d665c91bb06d517f (patch) | |
tree | cb042698ebb3f11a6ad782696d6859c6ff81d370 /sys/pc98 | |
parent | 3c6b0942ae70e4f0920264c097e0bbc5d3dc3c90 (diff) | |
download | FreeBSD-src-ca048afcef64a9f537f75d68d665c91bb06d517f.zip FreeBSD-src-ca048afcef64a9f537f75d68d665c91bb06d517f.tar.gz |
Merged from sys/i386/isa/isa_dma.c revision 1.6.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/cbus_dma.c | 50 | ||||
-rw-r--r-- | sys/pc98/pc98/isa_dma.c | 50 |
2 files changed, 98 insertions, 2 deletions
diff --git a/sys/pc98/cbus/cbus_dma.c b/sys/pc98/cbus/cbus_dma.c index e6f3f1a..62de37d 100644 --- a/sys/pc98/cbus/cbus_dma.c +++ b/sys/pc98/cbus/cbus_dma.c @@ -53,7 +53,10 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/module.h> #ifdef PC98 #include <machine/md_var.h> #endif @@ -65,8 +68,8 @@ #else #include <i386/isa/isa.h> #endif -#include <i386/isa/isa_dma.h> #include <i386/isa/ic/i8237.h> +#include <isa/isavar.h> /* ** Register definitions for DMA controller 1 (channels 0..3): @@ -565,3 +568,48 @@ isa_dmastop(int chan) } return(isa_dmastatus(chan)); } + +/* + * Attach to the ISA PnP descriptor for the AT DMA controller + */ +static struct isa_pnp_id atdma_ids[] = { + { 0x0002d041 /* PNP0200 */, "AT DMA controller" }, + { 0 } +}; + +static int +atdma_probe(device_t dev) +{ + int result; + + if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, atdma_ids)) <= 0) + device_quiet(dev); + return(result); +} + +static int +atdma_attach(device_t dev) +{ + return(0); +} + +static device_method_t atdma_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, atdma_probe), + DEVMETHOD(device_attach, atdma_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + { 0, 0 } +}; + +static driver_t atdma_driver = { + "atdma", + atdma_methods, + 1, /* no softc */ +}; + +static devclass_t atdma_devclass; + +DRIVER_MODULE(atdma, isa, atdma_driver, atdma_devclass, 0, 0); diff --git a/sys/pc98/pc98/isa_dma.c b/sys/pc98/pc98/isa_dma.c index e6f3f1a..62de37d 100644 --- a/sys/pc98/pc98/isa_dma.c +++ b/sys/pc98/pc98/isa_dma.c @@ -53,7 +53,10 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/module.h> #ifdef PC98 #include <machine/md_var.h> #endif @@ -65,8 +68,8 @@ #else #include <i386/isa/isa.h> #endif -#include <i386/isa/isa_dma.h> #include <i386/isa/ic/i8237.h> +#include <isa/isavar.h> /* ** Register definitions for DMA controller 1 (channels 0..3): @@ -565,3 +568,48 @@ isa_dmastop(int chan) } return(isa_dmastatus(chan)); } + +/* + * Attach to the ISA PnP descriptor for the AT DMA controller + */ +static struct isa_pnp_id atdma_ids[] = { + { 0x0002d041 /* PNP0200 */, "AT DMA controller" }, + { 0 } +}; + +static int +atdma_probe(device_t dev) +{ + int result; + + if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, atdma_ids)) <= 0) + device_quiet(dev); + return(result); +} + +static int +atdma_attach(device_t dev) +{ + return(0); +} + +static device_method_t atdma_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, atdma_probe), + DEVMETHOD(device_attach, atdma_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + { 0, 0 } +}; + +static driver_t atdma_driver = { + "atdma", + atdma_methods, + 1, /* no softc */ +}; + +static devclass_t atdma_devclass; + +DRIVER_MODULE(atdma, isa, atdma_driver, atdma_devclass, 0, 0); |