From ca048afcef64a9f537f75d68d665c91bb06d517f Mon Sep 17 00:00:00 2001 From: kato Date: Wed, 28 Jun 2000 03:18:51 +0000 Subject: Merged from sys/i386/isa/isa_dma.c revision 1.6. --- sys/pc98/cbus/cbus_dma.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++- sys/pc98/pc98/isa_dma.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 98 insertions(+), 2 deletions(-) (limited to 'sys/pc98') 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 #include +#include +#include #include +#include #ifdef PC98 #include #endif @@ -65,8 +68,8 @@ #else #include #endif -#include #include +#include /* ** 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 #include +#include +#include #include +#include #ifdef PC98 #include #endif @@ -65,8 +68,8 @@ #else #include #endif -#include #include +#include /* ** 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); -- cgit v1.1