diff options
author | msmith <msmith@FreeBSD.org> | 2000-06-23 07:44:33 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2000-06-23 07:44:33 +0000 |
commit | dd93fd16a6696fe0c9c1b69539b2ac899c04978e (patch) | |
tree | ced3f143f58f67f9f3e1a80e95d8b0ab2df4a6ae /sys/i386/isa/isa_dma.c | |
parent | 9d946aa74ddb86df33489ee80770826d8dc37705 (diff) | |
download | FreeBSD-src-dd93fd16a6696fe0c9c1b69539b2ac899c04978e.zip FreeBSD-src-dd93fd16a6696fe0c9c1b69539b2ac899c04978e.tar.gz |
Add PnP probe methods to some common AT hardware drivers. In each case,
the PnP probe is merely a stub as we make assumptions about some of this
hardware before we have probed it.
Since these devices (with the exception of the speaker) are 'standard',
suppress output in the !bootverbose case to clean up the probe messages
somewhat.
Diffstat (limited to 'sys/i386/isa/isa_dma.c')
-rw-r--r-- | sys/i386/isa/isa_dma.c | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/sys/i386/isa/isa_dma.c b/sys/i386/isa/isa_dma.c index 1cc1ea8..dab5e6a 100644 --- a/sys/i386/isa/isa_dma.c +++ b/sys/i386/isa/isa_dma.c @@ -49,13 +49,16 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/module.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> #include <i386/isa/isa.h> -#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): @@ -494,3 +497,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); |