summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/files.pc982
-rw-r--r--sys/pc98/conf/files.pc982
-rw-r--r--sys/pc98/pc98/if_ed.c7
-rw-r--r--sys/pc98/pc98/isa_compat.c327
-rw-r--r--sys/pc98/pc98/isa_compat.h390
5 files changed, 724 insertions, 4 deletions
diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98
index f042317..f04195e 100644
--- a/sys/conf/files.pc98
+++ b/sys/conf/files.pc98
@@ -208,7 +208,7 @@ i386/isa/intr_machdep.c standard
i386/isa/ipl_funcs.c standard \
compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} $<"
i386/isa/isa.c optional isa
-i386/isa/isa_compat.c optional isa
+pc98/pc98/isa_compat.c optional isa
pc98/pc98/isa_dma.c optional isa
i386/isa/istallion.c optional stli
i386/isa/joy.c optional joy
diff --git a/sys/pc98/conf/files.pc98 b/sys/pc98/conf/files.pc98
index f042317..f04195e 100644
--- a/sys/pc98/conf/files.pc98
+++ b/sys/pc98/conf/files.pc98
@@ -208,7 +208,7 @@ i386/isa/intr_machdep.c standard
i386/isa/ipl_funcs.c standard \
compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} $<"
i386/isa/isa.c optional isa
-i386/isa/isa_compat.c optional isa
+pc98/pc98/isa_compat.c optional isa
pc98/pc98/isa_dma.c optional isa
i386/isa/istallion.c optional stli
i386/isa/joy.c optional joy
diff --git a/sys/pc98/pc98/if_ed.c b/sys/pc98/pc98/if_ed.c
index a32134f..0ff9aa7 100644
--- a/sys/pc98/pc98/if_ed.c
+++ b/sys/pc98/pc98/if_ed.c
@@ -60,7 +60,10 @@
*/
#include "ed.h"
+#if 0
+/* XXX */
#include "pnp.h"
+#endif
#ifndef EXTRA_ED
# if NPNP > 0
@@ -97,10 +100,10 @@
#include <i386/isa/isa_device.h>
#include <i386/isa/icu.h>
-#include <i386/isa/if_edreg.h>
+#include <dev/ed/if_edreg.h>
#if NPNP > 0
-#include <i386/isa/pnp.h>
+#include <isa/pnpvar.h>
#endif
#ifdef PC98
diff --git a/sys/pc98/pc98/isa_compat.c b/sys/pc98/pc98/isa_compat.c
new file mode 100644
index 0000000..a2f6224
--- /dev/null
+++ b/sys/pc98/pc98/isa_compat.c
@@ -0,0 +1,327 @@
+/*-
+ * Copyright (c) 1998 Doug Rabson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/bus.h>
+#include <sys/malloc.h>
+#include <sys/module.h>
+#include <machine/bus.h>
+#include <sys/rman.h>
+
+#include <machine/vmparam.h>
+#include <vm/vm.h>
+#include <vm/pmap.h>
+#include <machine/pmap.h>
+#include <machine/md_var.h>
+
+#include <machine/resource.h>
+#include <isa/isavar.h>
+#include <pc98/pc98/isa_compat.h>
+#include <i386/isa/isa_device.h>
+
+struct isa_compat_resources {
+ struct resource *ports;
+ struct resource *memory;
+ struct resource *drq;
+ struct resource *irq;
+};
+
+int
+isa_compat_nextid(void)
+{
+ static int id = 2; /* id_id of -1, 0 and 1 are "used" */
+
+ return id++;
+}
+
+static void
+isa_compat_alloc_resources(device_t dev, struct isa_compat_resources *res)
+{
+ device_t parent = device_get_parent(dev);
+ int rid;
+ u_long start, count;
+
+ if (ISA_GET_RESOURCE(parent, dev, SYS_RES_IOPORT, 0,
+ &start, &count) == 0) {
+ rid = 0;
+ res->ports = bus_alloc_resource(dev, SYS_RES_IOPORT,
+ &rid, 0ul, ~0ul, 1,
+ RF_ACTIVE);
+ if (res->ports == NULL)
+ printf("isa_compat: didn't get ports for %s\n",
+ device_get_name(dev));
+ } else
+ res->ports = 0;
+
+ if (ISA_GET_RESOURCE(parent, dev, SYS_RES_MEMORY, 0,
+ &start, &count) == 0
+ && start != 0) {
+ rid = 0;
+ res->memory = bus_alloc_resource(dev, SYS_RES_MEMORY,
+ &rid, 0ul, ~0ul, 1,
+ RF_ACTIVE);
+ if (res->memory == NULL)
+ printf("isa_compat: didn't get memory for %s\n",
+ device_get_name(dev));
+ } else
+ res->memory = 0;
+
+ if (ISA_GET_RESOURCE(parent, dev, SYS_RES_DRQ, 0,
+ &start, &count) == 0) {
+ rid = 0;
+ res->drq = bus_alloc_resource(dev, SYS_RES_DRQ,
+ &rid, 0ul, ~0ul, 1,
+ RF_ACTIVE);
+ if (res->drq == NULL)
+ printf("isa_compat: didn't get drq for %s\n",
+ device_get_name(dev));
+ } else
+ res->drq = 0;
+
+ if (ISA_GET_RESOURCE(parent, dev, SYS_RES_IRQ, 0,
+ &start, &count) == 0) {
+ rid = 0;
+ res->irq = bus_alloc_resource(dev, SYS_RES_IRQ,
+ &rid, 0ul, ~0ul, 1,
+ RF_SHAREABLE | RF_ACTIVE);
+ if (res->irq == NULL)
+ printf("isa_compat: didn't get irq for %s\n",
+ device_get_name(dev));
+ } else
+ res->irq = 0;
+}
+
+static void
+isa_compat_release_resources(device_t dev, struct isa_compat_resources *res)
+{
+ if (res->ports) {
+ bus_release_resource(dev, SYS_RES_IOPORT, 0, res->ports);
+ res->ports = 0;
+ }
+ if (res->memory) {
+ bus_release_resource(dev, SYS_RES_MEMORY, 0, res->memory);
+ res->memory = 0;
+ }
+ if (res->drq) {
+ bus_release_resource(dev, SYS_RES_DRQ, 0, res->drq);
+ res->drq = 0;
+ }
+ if (res->irq) {
+ bus_release_resource(dev, SYS_RES_IRQ, 0, res->irq);
+ res->irq = 0;
+ }
+}
+
+#define irqmask(x) ((x) < 0 ? 0 : (1 << (x)))
+
+static int
+isa_compat_probe(device_t dev)
+{
+ device_t parent = device_get_parent(dev);
+ struct isa_device *dvp = device_get_softc(dev);
+ struct isa_compat_resources res;
+ struct old_isa_driver *op;
+ u_long start, count;
+
+ /* No pnp support */
+ if (isa_get_vendorid(dev))
+ return (ENXIO);
+
+ 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 = op->driver;
+ if (ISA_GET_RESOURCE(parent, dev, SYS_RES_IOPORT, 0,
+ &start, &count) == 0)
+ dvp->id_iobase = start;
+ else
+ dvp->id_iobase = -1;
+ if (ISA_GET_RESOURCE(parent, dev, SYS_RES_IRQ, 0,
+ &start, &count) == 0)
+ dvp->id_irq = irqmask(start);
+ else
+ dvp->id_irq = 0;
+ if (ISA_GET_RESOURCE(parent, dev, SYS_RES_DRQ, 0,
+ &start, &count) == 0)
+ dvp->id_drq = start;
+ else
+ dvp->id_drq = -1;
+ if (ISA_GET_RESOURCE(parent, dev, SYS_RES_MEMORY,
+ 0, &start, &count) == 0) {
+ dvp->id_maddr = (void *)(uintptr_t)start;
+ dvp->id_msize = count;
+ } else {
+ dvp->id_maddr = NULL;
+ dvp->id_msize = 0;
+ }
+ dvp->id_unit = device_get_unit(dev);
+ dvp->id_flags = device_get_flags(dev);
+ dvp->id_enabled = device_is_enabled(dev); /* XXX unused */
+ dvp->id_device = dev;
+
+ /*
+ * Do the wrapped probe.
+ */
+ if (dvp->id_driver->probe) {
+ int portsize;
+ void *maddr;
+ struct isa_device old;
+
+ isa_compat_alloc_resources(dev, &res);
+ if (res.memory)
+ maddr = rman_get_virtual(res.memory);
+ else
+ maddr = 0;
+ dvp->id_maddr = maddr;
+ old = *dvp;
+ portsize = dvp->id_driver->probe(dvp);
+ isa_compat_release_resources(dev, &res);
+ if (portsize != 0) {
+ if (portsize > 0 || dvp->id_iobase != old.id_iobase)
+ ISA_SET_RESOURCE(parent, dev, SYS_RES_IOPORT,
+ 0, dvp->id_iobase, portsize);
+ if (dvp->id_irq != old.id_irq)
+ ISA_SET_RESOURCE(parent, dev, SYS_RES_IRQ, 0,
+ ffs(dvp->id_irq) - 1, 1);
+ if (dvp->id_drq != old.id_drq)
+ ISA_SET_RESOURCE(parent, dev, SYS_RES_DRQ, 0,
+ dvp->id_drq, 1);
+ if (dvp->id_maddr != old.id_maddr
+ || dvp->id_msize != old.id_msize) {
+ maddr = dvp->id_maddr;
+ if (maddr != NULL)
+ ISA_SET_RESOURCE(parent, dev,
+ SYS_RES_MEMORY,
+ 0,
+ kvtop(maddr),
+ dvp->id_msize);
+ else
+ ISA_DELETE_RESOURCE(parent, dev,
+ SYS_RES_MEMORY,
+ 0);
+ }
+ return 0;
+ }
+ }
+ return ENXIO;
+}
+
+static int
+isa_compat_attach(device_t dev)
+{
+ struct isa_device *dvp = device_get_softc(dev);
+ struct isa_compat_resources res;
+ int error;
+
+ bzero(&res, sizeof(res));
+ isa_compat_alloc_resources(dev, &res);
+ 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, op->type,
+ dvp->id_intr,
+ (void *)(uintptr_t)dvp->id_unit,
+ &ih);
+ if (error)
+ printf("isa_compat_attach: failed to setup intr: %d\n",
+ error);
+ }
+ return 0;
+}
+
+static device_method_t isa_compat_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, isa_compat_probe),
+ DEVMETHOD(device_attach, isa_compat_attach),
+
+ { 0, 0 }
+};
+
+/*
+ * Create a new style driver around each old isa driver.
+ */
+void
+isa_wrap_old_drivers(void)
+{
+ int i;
+ struct old_isa_driver *op;
+ devclass_t isa_devclass = devclass_find("isa");
+
+ for (i = 0, op = &old_drivers[0]; i < old_drivers_count; i++, op++) {
+ driver_t *driver;
+ driver = malloc(sizeof(driver_t), M_DEVBUF, M_NOWAIT);
+ if (!driver)
+ continue;
+ bzero(driver, sizeof(driver_t));
+ driver->name = op->driver->name;
+ driver->methods = isa_compat_methods;
+ driver->softc = sizeof(struct isa_device);
+ driver->priv = op;
+ if (op->driver->sensitive_hw)
+ resource_set_int(op->driver->name, -1, "sensitive", 1);
+ devclass_add_driver(isa_devclass, driver);
+ }
+}
+
+int
+haveseen_iobase(struct isa_device *dvp, int size)
+{
+ int rid;
+ struct resource *res;
+ device_t dev = dvp->id_device;
+ int base = dvp->id_iobase;
+
+ /*
+ * Ask for resource 1 so that we don't hurt our hints. In theory
+ * this should work, but....
+ */
+ rid = 1;
+ res = bus_alloc_resource(dev, SYS_RES_IOPORT,
+ &rid, base, base + size, size, RF_ACTIVE);
+ if (res)
+ bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
+ return res ? 0 : 1;
+}
+
+void
+reconfig_isadev(isdp, mp)
+ struct isa_device *isdp;
+ u_int *mp;
+{
+ printf("reconfig_isadev() called - FIXME!\n");
+}
diff --git a/sys/pc98/pc98/isa_compat.h b/sys/pc98/pc98/isa_compat.h
new file mode 100644
index 0000000..de4fdd2
--- /dev/null
+++ b/sys/pc98/pc98/isa_compat.h
@@ -0,0 +1,390 @@
+/*-
+ * Copyright (c) 1998 Doug Rabson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include "vt.h"
+#include "adv.h"
+#include "aha.h"
+#include "wdc.h"
+#include "mse.h"
+#include "ar.h"
+#include "cs.h"
+#include "cx.h"
+#include "el.h"
+#include "ed.h"
+#include "ep.h"
+#include "ex.h"
+#include "fe.h"
+#include "ie.h"
+#include "le.h"
+#include "lnc.h"
+#include "rdp.h"
+#include "sr.h"
+#include "wl.h"
+#include "ze.h"
+#include "zp.h"
+#include "oltr.h"
+#include "pcm.h"
+#include "pas.h"
+#include "sb.h"
+#include "sbxvi.h"
+#include "sbmidi.h"
+#include "awe.h"
+#include "gus.h"
+#include "mss.h"
+#include "css.h"
+#include "sscape.h"
+#include "trix.h"
+#include "opl.h"
+#include "mpu.h"
+#include "uart.h"
+#include "pca.h"
+#include "mcd.h"
+#include "scd.h"
+#include "matcd.h"
+#include "wt.h"
+#include "ctx.h"
+#include "spigot.h"
+#include "gp.h"
+#include "gsc.h"
+#include "joy.h"
+#include "cy.h"
+#include "dgb.h"
+#include "dgm.h"
+#include "labpc.h"
+#include "rc.h"
+#include "rp.h"
+#include "tw.h"
+#include "si.h"
+#include "asc.h"
+#include "stl.h"
+#include "stli.h"
+#include "loran.h"
+#include "pcf.h"
+#include "isic.h"
+#include "tina.h"
+#include "ppc.h"
+#include "fla.h"
+#ifdef PC98
+#include "bs.h"
+#endif
+
+struct old_isa_driver {
+ int type;
+ struct isa_driver *driver;
+};
+
+extern struct isa_driver vtdriver;
+extern struct isa_driver advdriver;
+extern struct isa_driver ahadriver;
+extern struct isa_driver wdcdriver;
+extern struct isa_driver msedriver;
+extern struct isa_driver ardriver;
+extern struct isa_driver csdriver;
+extern struct isa_driver cxdriver;
+extern struct isa_driver eddriver;
+extern struct isa_driver eldriver;
+extern struct isa_driver epdriver;
+extern struct isa_driver exdriver;
+extern struct isa_driver fedriver;
+extern struct isa_driver iedriver;
+extern struct isa_driver ledriver;
+extern struct isa_driver lncdriver;
+extern struct isa_driver rdpdriver;
+extern struct isa_driver srdriver;
+extern struct isa_driver wldriver;
+extern struct isa_driver zedriver;
+extern struct isa_driver zpdriver;
+extern struct isa_driver oltrdriver;
+extern struct isa_driver pasdriver;
+extern struct isa_driver sbdriver;
+extern struct isa_driver sbxvidriver;
+extern struct isa_driver sbmididriver;
+extern struct isa_driver awedriver;
+extern struct isa_driver gusdriver;
+extern struct isa_driver mssdriver;
+extern struct isa_driver cssdriver;
+extern struct isa_driver sscapedriver;
+extern struct isa_driver trixdriver;
+extern struct isa_driver sscape_mssdriver;
+extern struct isa_driver opldriver;
+extern struct isa_driver mpudriver;
+extern struct isa_driver uartdriver;
+extern struct isa_driver pcadriver;
+extern struct isa_driver mcddriver;
+extern struct isa_driver scddriver;
+extern struct isa_driver matcddriver;
+extern struct isa_driver wtdriver;
+extern struct isa_driver ctxdriver;
+extern struct isa_driver spigotdriver;
+extern struct isa_driver gpdriver;
+extern struct isa_driver gscdriver;
+extern struct isa_driver joydriver;
+extern struct isa_driver cydriver;
+extern struct isa_driver dgbdriver;
+extern struct isa_driver dgmdriver;
+extern struct isa_driver labpcdriver;
+extern struct isa_driver rcdriver;
+extern struct isa_driver rpdriver;
+extern struct isa_driver twdriver;
+extern struct isa_driver sidriver;
+extern struct isa_driver ascdriver;
+extern struct isa_driver stldriver;
+extern struct isa_driver stlidriver;
+extern struct isa_driver lorandriver;
+extern struct isa_driver pcfdriver;
+extern struct isa_driver isicdriver;
+extern struct isa_driver tinadriver;
+extern struct isa_driver ppcdriver;
+#ifdef PC98
+extern struct isa_driver bsdriver;
+#endif
+
+
+static struct old_isa_driver old_drivers[] = {
+
+/* Sensitive TTY */
+
+/* Sensitive BIO */
+
+/* Sensitive NET */
+#if NFE > 0
+ { INTR_TYPE_NET, &fedriver },
+#endif
+#if NRDP > 0
+ { INTR_TYPE_NET, &rdpdriver },
+#endif
+
+/* Sensitive CAM */
+
+/* TTY */
+
+#if NVT > 0
+ { INTR_TYPE_TTY, &vtdriver },
+#endif
+#if NMSE > 0
+ { INTR_TYPE_TTY, &msedriver },
+#endif
+#if NPCA > 0
+ { INTR_TYPE_TTY, &pcadriver },
+#endif
+#if NGP > 0
+ { INTR_TYPE_TTY, &gpdriver },
+#endif
+#if NGSC > 0
+ { INTR_TYPE_TTY, &gscdriver },
+#endif
+#if NCY > 0
+ { INTR_TYPE_TTY, &cydriver },
+#endif
+#if NDGB > 0
+ { INTR_TYPE_TTY, &dgbdriver },
+#endif
+#if NDGM > 0
+ { INTR_TYPE_TTY, &dgmdriver },
+#endif
+#if NLABPC > 0
+ { INTR_TYPE_TTY, &labpcdriver },
+#endif
+#if NRCD > 0
+ { INTR_TYPE_TTY, &rcdriver },
+#endif
+#if NRP > 0
+ { INTR_TYPE_TTY, &rpdriver },
+#endif
+#if NTW > 0
+ { INTR_TYPE_TTY, &twdriver },
+#endif
+#if NSI > 0
+ { INTR_TYPE_TTY, &sidriver },
+#endif
+#if NASC > 0
+ { INTR_TYPE_TTY, &ascdriver },
+#endif
+#if NSTL > 0
+ { INTR_TYPE_TTY, &stldriver },
+#endif
+#if NSTLI > 0
+ { INTR_TYPE_TTY, &stlidriver },
+#endif
+#if NLORAN > 0
+ { INTR_TYPE_TTY, &lorandriver },
+#endif
+#if NPPC > 0
+ { INTR_TYPE_TTY, &ppcdriver },
+#endif
+
+/* BIO */
+
+#if NWDC > 0
+ { INTR_TYPE_BIO, &wdcdriver },
+#endif
+#if NMCD > 0
+ { INTR_TYPE_BIO, &mcddriver },
+#endif
+#if NSCD > 0
+ { INTR_TYPE_BIO, &scddriver },
+#endif
+#if NMATCD > 0
+ { INTR_TYPE_BIO, &matcddriver },
+#endif
+#if NWT > 0
+ { INTR_TYPE_BIO, &wtdriver },
+#endif
+
+/* NET */
+
+#if NIE > 0
+ { INTR_TYPE_NET, &iedriver },
+#endif
+#if NED > 0
+ { INTR_TYPE_NET, &eddriver },
+#endif
+#if NEP > 0
+ { INTR_TYPE_NET, &epdriver },
+#endif
+#if NEX > 0
+ { INTR_TYPE_NET, &exdriver },
+#endif
+#if NLE > 0
+ { INTR_TYPE_NET, &ledriver },
+#endif
+#if NLNC > 0
+ { INTR_TYPE_NET, &lncdriver },
+#endif
+#if NZE > 0
+ { INTR_TYPE_NET, &zedriver },
+#endif
+#if NZP > 0
+ { INTR_TYPE_NET, &zpdriver },
+#endif
+#if NCS > 0
+ { INTR_TYPE_NET, &csdriver },
+#endif
+#if NAR > 0
+ { INTR_TYPE_NET, &ardriver },
+#endif
+#if NCX > 0
+ { INTR_TYPE_NET, &cxdriver },
+#endif
+#if NEL > 0
+ { INTR_TYPE_NET, &eldriver },
+#endif
+#if NSR > 0
+ { INTR_TYPE_NET, &srdriver },
+#endif
+#if NWL > 0
+ { INTR_TYPE_NET, &wldriver },
+#endif
+#if NPCF > 0
+ { INTR_TYPE_NET, &pcfdriver },
+#endif
+#if NISIC > 0
+ { INTR_TYPE_NET, &isicdriver },
+#endif
+#if NTINA > 0
+ { INTR_TYPE_NET, &tinadriver },
+#endif
+
+/* CAM */
+
+#ifndef PC98
+#if NADV > 0
+ { INTR_TYPE_CAM, &advdriver },
+#endif
+#endif
+
+#if NAHA > 0
+ { INTR_TYPE_CAM, &ahadriver },
+#endif
+
+#ifdef PC98
+#if NBS > 0
+ { INTR_TYPE_CAM, &bsdriver },
+#endif
+#endif
+
+/* MISC */
+
+#if NOLTR > 0
+ { INTR_TYPE_MISC, &oltrdriver },
+#endif
+#if NPAS > 0
+ { INTR_TYPE_MISC, &pasdriver },
+#endif
+#if NSB > 0
+ { INTR_TYPE_MISC, &sbdriver },
+#endif
+#if NSBXVI > 0
+ { INTR_TYPE_MISC, &sbxvidriver },
+#endif
+#if NSBMIDI > 0
+ { INTR_TYPE_MISC, &sbmididriver },
+#endif
+#if NAWE > 0
+ { INTR_TYPE_MISC, &awedriver },
+#endif
+#if NGUS > 0
+ { INTR_TYPE_MISC, &gusdriver },
+#endif
+#if NMSS > 0
+ { INTR_TYPE_MISC, &mssdriver },
+#endif
+#if NCSS > 0
+ { INTR_TYPE_MISC, &cssdriver },
+#endif
+#if NSSCAPE > 0
+ { INTR_TYPE_MISC, &sscapedriver },
+#endif
+#if NTRIX > 0
+ { INTR_TYPE_MISC, &trixdriver },
+#endif
+#if NSSCAPE > 0
+ { INTR_TYPE_MISC, &sscape_mssdriver },
+#endif
+#if NOPL > 0
+ { INTR_TYPE_MISC, &opldriver },
+#endif
+#if NMPU > 0
+ { INTR_TYPE_MISC, &mpudriver },
+#endif
+#if NUART > 0
+ { INTR_TYPE_MISC, &uartdriver },
+#endif
+#if NCTX > 0
+ { INTR_TYPE_MISC, &ctxdriver },
+#endif
+#if NSPIGOT > 0
+ { INTR_TYPE_MISC, &spigotdriver },
+#endif
+#if NJOY > 0
+ { INTR_TYPE_MISC, &joydriver },
+#endif
+
+};
+
+#define old_drivers_count (sizeof(old_drivers) / sizeof(old_drivers[0]))
OpenPOWER on IntegriCloud