summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/isa_compat.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-08 18:20:05 +0000
committerpeter <peter@FreeBSD.org>1999-05-08 18:20:05 +0000
commitd32f23787471ba3b6271cf03474a29e9a439d368 (patch)
tree1b6d9b86d8f95bbc496adba1f1e26e8aab8c54de /sys/i386/isa/isa_compat.c
parentefc7518c771fd43194b4fe00658b4544b429a678 (diff)
downloadFreeBSD-src-d32f23787471ba3b6271cf03474a29e9a439d368.zip
FreeBSD-src-d32f23787471ba3b6271cf03474a29e9a439d368.tar.gz
GC some unused stuff relating to the old conflict checking and other lint.
Change haveseen_isadev() to something a little easier to emulate. Store the device_t for the wrapper in isa_device. Implement a replacement for haveseen_isadev - namely haveseen_ioport() which takes a port size as an extra argument for a proper range check. This (haveseen_ioport()) has not been tested, but I think it'll work.
Diffstat (limited to 'sys/i386/isa/isa_compat.c')
-rw-r--r--sys/i386/isa/isa_compat.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/sys/i386/isa/isa_compat.c b/sys/i386/isa/isa_compat.c
index ad5155d..a42f806 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.6 1999/04/24 07:04:51 peter Exp $
+ * $Id: isa_compat.c,v 1.7 1999/04/26 12:49:39 peter Exp $
*/
#include <sys/param.h>
@@ -153,7 +153,8 @@ isa_compat_probe(device_t dev)
dvp->id_msize = isa_get_msize(dev);
dvp->id_unit = device_get_unit(dev);
dvp->id_flags = isa_get_flags(dev);
- dvp->id_enabled = device_is_enabled(dev);
+ dvp->id_enabled = device_is_enabled(dev); /* XXX unused */
+ dvp->id_device = dev;
/*
* Do the wrapped probe.
@@ -249,17 +250,30 @@ isa_wrap_old_drivers(void)
driver->type = op->type;
driver->softc = sizeof(struct isa_device);
driver->priv = op->driver;
+ if (op->driver->sensitive_hw)
+ resource_set_int(op->driver->name, -1, "sensitive", 1);
devclass_add_driver(isa_devclass, driver);
}
}
int
-haveseen_isadev(dvp, checkbits)
- struct isa_device *dvp;
- u_int checkbits;
+haveseen_iobase(struct isa_device *dvp, int size)
{
- printf("haveseen_isadev() called - FIXME!\n");
- return 0;
+ 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
OpenPOWER on IntegriCloud