diff options
author | dfr <dfr@FreeBSD.org> | 1999-05-08 21:59:43 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1999-05-08 21:59:43 +0000 |
commit | e4989c23fe81c5060ef3a4e0e3bb1bb4430d1a76 (patch) | |
tree | ba748fea961d917292e2b4a959796c7415efbf31 /sys/i386/isa | |
parent | d1098a6692d3c3b23bc870a491d680451c3356a7 (diff) | |
download | FreeBSD-src-e4989c23fe81c5060ef3a4e0e3bb1bb4430d1a76.zip FreeBSD-src-e4989c23fe81c5060ef3a4e0e3bb1bb4430d1a76.tar.gz |
Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/bt_isa.c | 3 | ||||
-rw-r--r-- | sys/i386/isa/fd.c | 8 | ||||
-rw-r--r-- | sys/i386/isa/isa.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/isa_compat.c | 13 | ||||
-rw-r--r-- | sys/i386/isa/isa_compat.h | 130 | ||||
-rw-r--r-- | sys/i386/isa/npx.c | 6 | ||||
-rw-r--r-- | sys/i386/isa/pcf.c | 3 |
7 files changed, 85 insertions, 87 deletions
diff --git a/sys/i386/isa/bt_isa.c b/sys/i386/isa/bt_isa.c index f2150a7..c9d52c3 100644 --- a/sys/i386/isa/bt_isa.c +++ b/sys/i386/isa/bt_isa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_isa.c,v 1.9 1999/04/18 19:08:28 peter Exp $ + * $Id: bt_isa.c,v 1.10 1999/04/24 06:48:27 peter Exp $ */ #include <sys/param.h> @@ -330,7 +330,6 @@ static device_method_t bt_isa_methods[] = { static driver_t bt_isa_driver = { "bt", bt_isa_methods, - DRIVER_TYPE_CAM, sizeof(struct bt_softc), }; diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c index f0a082f..197975b 100644 --- a/sys/i386/isa/fd.c +++ b/sys/i386/isa/fd.c @@ -47,7 +47,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.140 1999/05/07 10:10:30 phk Exp $ + * $Id: fd.c,v 1.141 1999/05/08 18:13:14 peter Exp $ * */ @@ -606,8 +606,8 @@ fdc_probe(device_t dev) goto out; } fdc->dmachan = fdc->res_drq->r_start; - error = BUS_SETUP_INTR(device_get_parent(dev), dev, - fdc->res_irq, fdc_intr, fdc, &fdc->fdc_intr); + error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq, + INTR_TYPE_BIO, fdc_intr, fdc, &fdc->fdc_intr); /* First - lets reset the floppy controller */ outb(fdc->baseport + FDOUT, 0); @@ -2333,7 +2333,6 @@ static device_method_t fdc_methods[] = { static driver_t fdc_driver = { "fdc", fdc_methods, - DRIVER_TYPE_BIO, sizeof(struct fdc_data) }; @@ -2354,7 +2353,6 @@ static device_method_t fd_methods[] = { static driver_t fd_driver = { "fd", fd_methods, - DRIVER_TYPE_BIO, sizeof(struct fd_data) }; diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c index 5251c80..512be7a 100644 --- a/sys/i386/isa/isa.c +++ b/sys/i386/isa/isa.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa.c,v 1.123 1999/05/08 18:15:49 peter Exp $ + * $Id: isa.c,v 1.124 1999/05/08 21:28:39 peter Exp $ */ /* @@ -564,11 +564,11 @@ isa_release_resource(device_t bus, device_t child, int type, int rid, * deal). */ static int -isa_setup_intr(device_t bus, device_t child, struct resource *r, +isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, void (*ihand)(void *), void *arg, void **cookiep) { - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, ihand, arg, - cookiep)); + return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, + ihand, arg, cookiep)); } static int @@ -604,7 +604,6 @@ static device_method_t isa_methods[] = { static driver_t isa_driver = { "isa", isa_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/i386/isa/isa_compat.c b/sys/i386/isa/isa_compat.c index a42f806..e1959f6 100644 --- a/sys/i386/isa/isa_compat.c +++ b/sys/i386/isa/isa_compat.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa_compat.c,v 1.7 1999/04/26 12:49:39 peter Exp $ + * $Id: isa_compat.c,v 1.8 1999/05/08 18:20:03 peter Exp $ */ #include <sys/param.h> @@ -139,13 +139,15 @@ isa_compat_probe(device_t dev) { struct isa_device *dvp = device_get_softc(dev); struct isa_compat_resources res; + struct old_isa_driver *op; bzero(&res, sizeof(res)); /* * Fill in the isa_device fields. */ + op = device_get_driver(dev)->priv; dvp->id_id = isa_compat_nextid(); - dvp->id_driver = device_get_driver(dev)->priv; + dvp->id_driver = op->driver; dvp->id_iobase = isa_get_port(dev); dvp->id_irq = irqmask(isa_get_irq(dev)); dvp->id_drq = isa_get_drq(dev); @@ -207,10 +209,12 @@ isa_compat_attach(device_t dev) if (dvp->id_driver->attach) dvp->id_driver->attach(dvp); if (res.irq && dvp->id_irq && dvp->id_intr) { + struct old_isa_driver *op; void *ih; + op = device_get_driver(dev)->priv; error = BUS_SETUP_INTR(device_get_parent(dev), dev, - res.irq, + res.irq, op->type, dvp->id_intr, (void *)(uintptr_t)dvp->id_unit, &ih); @@ -247,9 +251,8 @@ isa_wrap_old_drivers(void) bzero(driver, sizeof(driver_t)); driver->name = op->driver->name; driver->methods = isa_compat_methods; - driver->type = op->type; driver->softc = sizeof(struct isa_device); - driver->priv = op->driver; + driver->priv = op; if (op->driver->sensitive_hw) resource_set_int(op->driver->name, -1, "sensitive", 1); devclass_add_driver(isa_devclass, driver); diff --git a/sys/i386/isa/isa_compat.h b/sys/i386/isa/isa_compat.h index 4615b38..116ed10 100644 --- a/sys/i386/isa/isa_compat.h +++ b/sys/i386/isa/isa_compat.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa_compat.h,v 1.4 1999/04/24 04:21:42 kato Exp $ + * $Id: isa_compat.h,v 1.5 1999/05/08 14:36:47 phk Exp $ */ #include "vt.h" @@ -175,13 +175,13 @@ static struct old_isa_driver old_drivers[] = { /* Sensitive NET */ #if NED > 0 - { DRIVER_TYPE_NET, &eddriver }, + { INTR_TYPE_NET, &eddriver }, #endif #if NFE > 0 - { DRIVER_TYPE_NET, &fedriver }, + { INTR_TYPE_NET, &fedriver }, #endif #if NRDP > 0 - { DRIVER_TYPE_NET, &rdpdriver }, + { INTR_TYPE_NET, &rdpdriver }, #endif /* Sensitive CAM */ @@ -189,76 +189,76 @@ static struct old_isa_driver old_drivers[] = { /* TTY */ #if NVT > 0 - { DRIVER_TYPE_TTY, &vtdriver }, + { INTR_TYPE_TTY, &vtdriver }, #endif #if NMSE > 0 - { DRIVER_TYPE_TTY, &msedriver }, + { INTR_TYPE_TTY, &msedriver }, #endif #if NPCA > 0 - { DRIVER_TYPE_TTY, &pcadriver }, + { INTR_TYPE_TTY, &pcadriver }, #endif #if NGP > 0 - { DRIVER_TYPE_TTY, &gpdriver }, + { INTR_TYPE_TTY, &gpdriver }, #endif #if NGSC > 0 - { DRIVER_TYPE_TTY, &gscdriver }, + { INTR_TYPE_TTY, &gscdriver }, #endif #if NCY > 0 - { DRIVER_TYPE_TTY, &cydriver }, + { INTR_TYPE_TTY, &cydriver }, #endif #if NDGB > 0 - { DRIVER_TYPE_TTY, &dgbdriver }, + { INTR_TYPE_TTY, &dgbdriver }, #endif #if NDGM > 0 - { DRIVER_TYPE_TTY, &dgmdriver }, + { INTR_TYPE_TTY, &dgmdriver }, #endif #if NLABPC > 0 - { DRIVER_TYPE_TTY, &labpcdriver }, + { INTR_TYPE_TTY, &labpcdriver }, #endif #if NRCD > 0 - { DRIVER_TYPE_TTY, &rcdriver }, + { INTR_TYPE_TTY, &rcdriver }, #endif #if NRP > 0 - { DRIVER_TYPE_TTY, &rpdriver }, + { INTR_TYPE_TTY, &rpdriver }, #endif #if NTW > 0 - { DRIVER_TYPE_TTY, &twdriver }, + { INTR_TYPE_TTY, &twdriver }, #endif #if NSI > 0 - { DRIVER_TYPE_TTY, &sidriver }, + { INTR_TYPE_TTY, &sidriver }, #endif #if NASC > 0 - { DRIVER_TYPE_TTY, &ascdriver }, + { INTR_TYPE_TTY, &ascdriver }, #endif #if NSTL > 0 - { DRIVER_TYPE_TTY, &stldriver }, + { INTR_TYPE_TTY, &stldriver }, #endif #if NSTLI > 0 - { DRIVER_TYPE_TTY, &stlidriver }, + { INTR_TYPE_TTY, &stlidriver }, #endif #if NLORAN > 0 - { DRIVER_TYPE_TTY, &lorandriver }, + { INTR_TYPE_TTY, &lorandriver }, #endif #if NPPC > 0 - { DRIVER_TYPE_TTY, &ppcdriver }, + { INTR_TYPE_TTY, &ppcdriver }, #endif /* BIO */ #if NWDC > 0 - { DRIVER_TYPE_BIO, &wdcdriver }, + { INTR_TYPE_BIO, &wdcdriver }, #endif #if NMCD > 0 - { DRIVER_TYPE_BIO, &mcddriver }, + { INTR_TYPE_BIO, &mcddriver }, #endif #if NSCD > 0 - { DRIVER_TYPE_BIO, &scddriver }, + { INTR_TYPE_BIO, &scddriver }, #endif #if NMATCD > 0 - { DRIVER_TYPE_BIO, &matcddriver }, + { INTR_TYPE_BIO, &matcddriver }, #endif #if NWT > 0 - { DRIVER_TYPE_BIO, &wtdriver }, + { INTR_TYPE_BIO, &wtdriver }, #endif #if NFLA > 0 { DRIVER_TYPE_MISC, &fladriver }, @@ -267,130 +267,130 @@ static struct old_isa_driver old_drivers[] = { /* NET */ #if NIE > 0 - { DRIVER_TYPE_NET, &iedriver }, + { INTR_TYPE_NET, &iedriver }, #endif #if NEP > 0 - { DRIVER_TYPE_NET, &epdriver }, + { INTR_TYPE_NET, &epdriver }, #endif #if NEX > 0 - { DRIVER_TYPE_NET, &exdriver }, + { INTR_TYPE_NET, &exdriver }, #endif #if NLE > 0 - { DRIVER_TYPE_NET, &ledriver }, + { INTR_TYPE_NET, &ledriver }, #endif #if NLNC > 0 - { DRIVER_TYPE_NET, &lncdriver }, + { INTR_TYPE_NET, &lncdriver }, #endif #if NZE > 0 - { DRIVER_TYPE_NET, &zedriver }, + { INTR_TYPE_NET, &zedriver }, #endif #if NZP > 0 - { DRIVER_TYPE_NET, &zpdriver }, + { INTR_TYPE_NET, &zpdriver }, #endif #if NCS > 0 - { DRIVER_TYPE_NET, &csdriver }, + { INTR_TYPE_NET, &csdriver }, #endif #if NAR > 0 - { DRIVER_TYPE_NET, &ardriver }, + { INTR_TYPE_NET, &ardriver }, #endif #if NCX > 0 - { DRIVER_TYPE_NET, &cxdriver }, + { INTR_TYPE_NET, &cxdriver }, #endif #if NEL > 0 - { DRIVER_TYPE_NET, &eldriver }, + { INTR_TYPE_NET, &eldriver }, #endif #if NSR > 0 - { DRIVER_TYPE_NET, &srdriver }, + { INTR_TYPE_NET, &srdriver }, #endif #if NWL > 0 - { DRIVER_TYPE_NET, &wldriver }, + { INTR_TYPE_NET, &wldriver }, #endif #if NPCF > 0 - { DRIVER_TYPE_NET, &pcfdriver }, + { INTR_TYPE_NET, &pcfdriver }, #endif #if NISIC > 0 - { DRIVER_TYPE_NET, &isicdriver }, + { INTR_TYPE_NET, &isicdriver }, #endif #if NTINA > 0 - { DRIVER_TYPE_NET, &tinadriver }, + { INTR_TYPE_NET, &tinadriver }, #endif /* CAM */ #ifndef PC98 #if NADV > 0 - { DRIVER_TYPE_CAM, &advdriver }, + { INTR_TYPE_CAM, &advdriver }, #endif #endif #if NAHA > 0 - { DRIVER_TYPE_CAM, &ahadriver }, + { INTR_TYPE_CAM, &ahadriver }, #endif #ifdef PC98 #if NBS > 0 - { DRIVER_TYPE_CAM, &bsdriver }, + { INTR_TYPE_CAM, &bsdriver }, #endif #endif /* MISC */ #if NOLTR > 0 - { DRIVER_TYPE_MISC, &oltrdriver }, + { INTR_TYPE_MISC, &oltrdriver }, #endif #if NPCM > 0 - { DRIVER_TYPE_MISC, &pcmdriver }, + { INTR_TYPE_MISC, &pcmdriver }, #endif #if NPAS > 0 - { DRIVER_TYPE_MISC, &pasdriver }, + { INTR_TYPE_MISC, &pasdriver }, #endif #if NSB > 0 - { DRIVER_TYPE_MISC, &sbdriver }, + { INTR_TYPE_MISC, &sbdriver }, #endif #if NSBXVI > 0 - { DRIVER_TYPE_MISC, &sbxvidriver }, + { INTR_TYPE_MISC, &sbxvidriver }, #endif #if NSBMIDI > 0 - { DRIVER_TYPE_MISC, &sbmididriver }, + { INTR_TYPE_MISC, &sbmididriver }, #endif #if NAWE > 0 - { DRIVER_TYPE_MISC, &awedriver }, + { INTR_TYPE_MISC, &awedriver }, #endif #if NGUS > 0 - { DRIVER_TYPE_MISC, &gusdriver }, + { INTR_TYPE_MISC, &gusdriver }, #endif #if NMSS > 0 - { DRIVER_TYPE_MISC, &mssdriver }, + { INTR_TYPE_MISC, &mssdriver }, #endif #if NCSS > 0 - { DRIVER_TYPE_MISC, &cssdriver }, + { INTR_TYPE_MISC, &cssdriver }, #endif #if NSSCAPE > 0 - { DRIVER_TYPE_MISC, &sscapedriver }, + { INTR_TYPE_MISC, &sscapedriver }, #endif #if NTRIX > 0 - { DRIVER_TYPE_MISC, &trixdriver }, + { INTR_TYPE_MISC, &trixdriver }, #endif #if NSSCAPE > 0 - { DRIVER_TYPE_MISC, &sscape_mssdriver }, + { INTR_TYPE_MISC, &sscape_mssdriver }, #endif #if NOPL > 0 - { DRIVER_TYPE_MISC, &opldriver }, + { INTR_TYPE_MISC, &opldriver }, #endif #if NMPU > 0 - { DRIVER_TYPE_MISC, &mpudriver }, + { INTR_TYPE_MISC, &mpudriver }, #endif #if NUART > 0 - { DRIVER_TYPE_MISC, &uartdriver }, + { INTR_TYPE_MISC, &uartdriver }, #endif #if NCTX > 0 - { DRIVER_TYPE_MISC, &ctxdriver }, + { INTR_TYPE_MISC, &ctxdriver }, #endif #if NSPIGOT > 0 - { DRIVER_TYPE_MISC, &spigotdriver }, + { INTR_TYPE_MISC, &spigotdriver }, #endif #if NJOY > 0 - { DRIVER_TYPE_MISC, &joydriver }, + { INTR_TYPE_MISC, &joydriver }, #endif }; diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 2d50255..063f7ce 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.69 1999/05/06 12:47:21 peter Exp $ + * $Id: npx.c,v 1.70 1999/05/08 18:14:09 peter Exp $ */ #include "npx.h" @@ -363,7 +363,8 @@ npx_probe1(dev) if (r == 0) panic("npx: can't get IRQ"); BUS_SETUP_INTR(device_get_parent(dev), - dev, r, npx_intr, 0, &intr); + dev, r, INTR_TYPE_MISC, + npx_intr, 0, &intr); if (intr == 0) panic("npx: can't create intr"); @@ -717,7 +718,6 @@ static device_method_t npx_methods[] = { static driver_t npx_driver = { "npx", npx_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/i386/isa/pcf.c b/sys/i386/isa/pcf.c index 12ac372..94d685b 100644 --- a/sys/i386/isa/pcf.c +++ b/sys/i386/isa/pcf.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pcf.c,v 1.7 1999/05/02 21:51:17 peter Exp $ + * $Id: pcf.c,v 1.8 1999/05/06 18:54:18 peter Exp $ * */ #include <sys/param.h> @@ -136,7 +136,6 @@ static device_method_t pcf_methods[] = { static driver_t pcf_driver = { "pcf", pcf_methods, - DRIVER_TYPE_MISC, sizeof(struct pcf_softc), }; |