summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2004-03-14 23:03:57 +0000
committerimp <imp@FreeBSD.org>2004-03-14 23:03:57 +0000
commitb1e8343fdf030b703725b69c480e87498e6339ef (patch)
tree8698639af8b8b93ddd9bf43355d2f48f72a07c2e /sys
parente9e7dbbcb812308aff828ce9031da5a08fb79c27 (diff)
downloadFreeBSD-src-b1e8343fdf030b703725b69c480e87498e6339ef.zip
FreeBSD-src-b1e8343fdf030b703725b69c480e87498e6339ef.tar.gz
Remove isa compat stuff.
Only cy, bs and wd in the tree still use it. I have a replacement for cy that I need to test on ISA and PCI cards. bs and wd are pc98 only drivers that appear to no longer be necessary. I'll be removing them when I hear back from the pc98 people.
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/files.i3862
-rw-r--r--sys/conf/files.pc982
-rw-r--r--sys/conf/options.i3861
-rw-r--r--sys/conf/options.pc981
-rw-r--r--sys/dev/pcf/pcf.c2
-rw-r--r--sys/i386/conf/NOTES1
-rw-r--r--sys/i386/isa/isa_compat.c324
-rw-r--r--sys/i386/isa/isa_device.h118
-rw-r--r--sys/i386/isa/pcf.c2
9 files changed, 0 insertions, 453 deletions
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 0161cc6..d0a98b8 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -266,8 +266,6 @@ i386/isa/elink.c optional ep
i386/isa/elink.c optional ie
i386/isa/if_el.c count el
i386/isa/isa.c optional isa
-i386/isa/isa_compat.c optional isa compat_oldisa \
- warning "Old ISA driver compatibility shims present."
i386/isa/isa_dma.c optional isa
i386/isa/mse.c optional mse
i386/isa/nmi.c standard
diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98
index d0a3f66..1371a88 100644
--- a/sys/conf/files.pc98
+++ b/sys/conf/files.pc98
@@ -203,8 +203,6 @@ i386/isa/cy.c count cy
i386/isa/elink.c optional ep
i386/isa/elink.c optional ie
i386/isa/isa.c optional isa
-i386/isa/isa_compat.c optional isa compat_oldisa \
- warning "Old ISA driver compatibility shims present."
i386/isa/npx.c optional npx
i386/isa/pmtimer.c optional pmtimer
i386/isa/prof_machdep.c optional profiling-routine
diff --git a/sys/conf/options.i386 b/sys/conf/options.i386
index 4c7495a..24a6584 100644
--- a/sys/conf/options.i386
+++ b/sys/conf/options.i386
@@ -4,7 +4,6 @@
AUTO_EOI_1 opt_auto_eoi.h
AUTO_EOI_2 opt_auto_eoi.h
BROKEN_KEYBOARD_RESET opt_reset.h
-COMPAT_OLDISA
DISABLE_PG_G opt_pmap.h
DISABLE_PSE opt_pmap.h
I586_PMC_GUPROF opt_i586_guprof.h
diff --git a/sys/conf/options.pc98 b/sys/conf/options.pc98
index d579f32..d9414df 100644
--- a/sys/conf/options.pc98
+++ b/sys/conf/options.pc98
@@ -3,7 +3,6 @@
AUTO_EOI_1 opt_auto_eoi.h
BROKEN_KEYBOARD_RESET opt_reset.h
-COMPAT_OLDISA
DISABLE_PG_G opt_pmap.h
DISABLE_PSE opt_pmap.h
I586_PMC_GUPROF opt_i586_guprof.h
diff --git a/sys/dev/pcf/pcf.c b/sys/dev/pcf/pcf.c
index 5799f4c..64c059e 100644
--- a/sys/dev/pcf/pcf.c
+++ b/sys/dev/pcf/pcf.c
@@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$");
#include <isa/isareg.h>
#include <isa/isavar.h>
-#include <i386/isa/isa_device.h>
-
#include <dev/iicbus/iiconf.h>
#include "iicbus_if.h"
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index 5c02359..8798661 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -310,7 +310,6 @@ device isa
# reset the CPU for reboot. This is needed on some systems with broken
# keyboard controllers.
-options COMPAT_OLDISA #Use ISA shims and glue for old drivers
options AUTO_EOI_1
#options AUTO_EOI_2
diff --git a/sys/i386/isa/isa_compat.c b/sys/i386/isa/isa_compat.c
deleted file mode 100644
index d5caced..0000000
--- a/sys/i386/isa/isa_compat.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*-
- * 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.
- */
-
-#ifndef BURN_BRIDGES
-
-#include <sys/cdefs.h>
-__FBSDID("$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 <i386/isa/isa_device.h>
-
-/*
- * The 'priv' field has been removed from 'struct driver' since the
- * only remaining user of that field was this compatibility layer. We
- * use this field to map from the newbus driver stub to the underlying
- * old-style isa driver.
- */
-struct isa_compat_driver {
- KOBJ_CLASS_FIELDS;
- void *priv;
-};
-
-struct isa_compat_resources {
- struct resource *ports;
- struct resource *memory;
- struct resource *drq;
- struct resource *irq;
-};
-
-static void
-isa_compat_alloc_resources(device_t dev, struct isa_compat_resources *res)
-{
- int rid;
- u_long start, count;
-
- if (bus_get_resource(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 && bootverbose)
- printf("isa_compat: didn't get ports for %s\n",
- device_get_name(dev));
- } else
- res->ports = 0;
-
- if (bus_get_resource(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 && bootverbose)
- printf("isa_compat: didn't get memory for %s\n",
- device_get_name(dev));
- } else
- res->memory = 0;
-
- if (bus_get_resource(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 && bootverbose)
- printf("isa_compat: didn't get drq for %s\n",
- device_get_name(dev));
- } else
- res->drq = 0;
-
- if (bus_get_resource(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 && bootverbose)
- 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)
-{
- struct isa_compat_driver *drv;
- struct isa_device *dvp = device_get_softc(dev);
- struct isa_compat_resources res;
- u_long start, count;
-
- /* No pnp support */
- if (isa_get_vendorid(dev))
- return (ENXIO);
-
- bzero(&res, sizeof(res));
- /*
- * Fill in the isa_device fields.
- */
- drv = (struct isa_compat_driver *) device_get_driver(dev);
- dvp->id_driver = drv->priv;
- if (bus_get_resource(dev, SYS_RES_IOPORT, 0,
- &start, &count) == 0)
- dvp->id_iobase = start;
- else
- dvp->id_iobase = -1;
- if (bus_get_resource(dev, SYS_RES_IRQ, 0,
- &start, &count) == 0)
- dvp->id_irq = irqmask(start);
- else
- dvp->id_irq = 0;
- if (bus_get_resource(dev, SYS_RES_DRQ, 0,
- &start, &count) == 0)
- dvp->id_drq = start;
- else
- dvp->id_drq = -1;
- if (bus_get_resource(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)
- bus_set_resource(dev, SYS_RES_IOPORT,
- 0, dvp->id_iobase, portsize);
- if (dvp->id_irq != old.id_irq)
- bus_set_resource(dev, SYS_RES_IRQ, 0,
- ffs(dvp->id_irq) - 1, 1);
- if (dvp->id_drq != old.id_drq)
- bus_set_resource(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)
- bus_set_resource(dev,
- SYS_RES_MEMORY,
- 0,
- kvtop(maddr),
- dvp->id_msize);
- else
- bus_delete_resource(dev,
- SYS_RES_MEMORY,
- 0);
- }
- return 0;
- }
- }
- return ENXIO;
-}
-
-static void
-isa_compat_intr(void *arg)
-{
- struct isa_device *dvp;
-
- dvp = (struct isa_device *)arg;
- dvp->id_ointr(dvp->id_unit);
-}
-
-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) {
- void *ih;
-
- error = BUS_SETUP_INTR(device_get_parent(dev), dev,
- res.irq, dvp->id_driver->intrflags,
- isa_compat_intr, dvp, &ih);
- if (error)
- printf("isa_compat_attach: failed to setup intr: %d\n",
- error);
- }
- device_printf(dev, "driver is using old-style compatibility shims\n");
- 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.
- */
-int
-compat_isa_handler(module_t mod, int type, void *data)
-{
- struct isa_driver *id = (struct isa_driver *)data;
- struct isa_compat_driver *driver;
- devclass_t isa_devclass = devclass_find("isa");
-
- switch (type) {
- case MOD_LOAD:
- driver = malloc(sizeof(struct isa_compat_driver),
- M_DEVBUF, M_NOWAIT | M_ZERO);
- if (!driver)
- return ENOMEM;
- driver->name = id->name;
- driver->methods = isa_compat_methods;
- driver->size = sizeof(struct isa_device);
- driver->priv = id;
- if (id->sensitive_hw) {
-#if 0
- resource_set_int(id->name, -1, "sensitive", 1);
-#else
- printf("WARNING: isa driver %s is sensitive, but cannot set it!\n",
- driver->name);
-#endif
- }
- devclass_add_driver(isa_devclass, (kobj_class_t) driver);
- break;
- case MOD_UNLOAD:
- printf("%s: module unload not supported!\n", id->name);
- return EOPNOTSUPP;
- default:
- break;
- }
- return 0;
-}
-
-#else
-#error "cvs rm sys/i386/isa/isa_compat.c"
-#endif
diff --git a/sys/i386/isa/isa_device.h b/sys/i386/isa/isa_device.h
deleted file mode 100644
index c4df8cd..0000000
--- a/sys/i386/isa/isa_device.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*-
- * Copyright (c) 1991 The Regents of the University of California.
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91
- * $FreeBSD$
- */
-
-#ifndef _I386_ISA_ISA_DEVICE_H_
-#define _I386_ISA_ISA_DEVICE_H_
-
-#ifndef BURN_BRIDGES
-
-#ifdef _KERNEL
-#include <sys/bus.h>
-#include <isa/isavar.h>
-#include "opt_compat_oldisa.h"
-#endif
-
-/*
- * ISA Bus Autoconfiguration
- */
-
-#ifdef COMPAT_OLDISA
-
-/* Interrupt handler function type. */
-typedef void ointhand2_t(int _device_id);
-
-/*
- * Per device structure.
- */
-struct isa_device {
- struct isa_driver *id_driver;
- int id_iobase; /* base i/o address */
- int id_iosize; /* base i/o length */
- u_int id_irq; /* interrupt request */
- int id_drq; /* DMA request */
- caddr_t id_maddr; /* physical i/o memory address on bus (if any)*/
- int id_msize; /* size of i/o memory */
- union {
- driver_intr_t *id_i;
- ointhand2_t *id_oi;
- } id_iu; /* interrupt interface routine */
-#define id_intr id_iu.id_i
-#define id_ointr id_iu.id_oi
- int id_unit; /* unit number */
- int id_flags; /* flags */
- int id_enabled; /* is device enabled */
- struct device *id_device; /* new-bus wrapper device */
-};
-
-/*
- * Per-driver structure.
- *
- * Each device driver defines entries for a set of routines
- * as well as an array of types which are acceptable to it.
- * These are used at boot time by the configuration program.
- */
-struct isa_driver {
- int intrflags;
- int (*probe)(struct isa_device *idp);
- /* test whether device is present */
- int (*attach)(struct isa_device *idp);
- /* setup driver for a device */
- const char *name; /* device name */
- int sensitive_hw; /* true if other probes confuse us */
-};
-
-#ifdef _KERNEL
-
-/* Wrappers */
-struct module;
-int compat_isa_handler(struct module *, int, void *);
-#define COMPAT_ISA_DRIVER(name, isadata) \
-static moduledata_t name##_mod = { \
- #name, \
- compat_isa_handler, \
- &isadata \
-}; \
-DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_ANY) \
-
-#endif
-
-#endif /* COMPAT_OLDISA */
-
-#else /* BURN_BRIDGES */
-#error "cvs rm sys/i386/isa/isa_device.h"
-#endif /* BURN_BRIDGES */
-
-#endif /* !_I386_ISA_ISA_DEVICE_H_ */
diff --git a/sys/i386/isa/pcf.c b/sys/i386/isa/pcf.c
index 5799f4c..64c059e 100644
--- a/sys/i386/isa/pcf.c
+++ b/sys/i386/isa/pcf.c
@@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$");
#include <isa/isareg.h>
#include <isa/isavar.h>
-#include <i386/isa/isa_device.h>
-
#include <dev/iicbus/iiconf.h>
#include "iicbus_if.h"
OpenPOWER on IntegriCloud