From 3331f029dcf961b9a0c91921698fab3803776e51 Mon Sep 17 00:00:00 2001 From: dfr Date: Sun, 15 Nov 1998 18:25:17 +0000 Subject: * Add hooks to allow the X server to access I/O ports and memory. * Update drivers to the latest version of the bus interface. The ISA drivers' use of the new resource api is minimal. Garrett has some much cleaner drivers which should be more easily shared between i386 and alpha. This has only been tested on cia based machines. It should work on lca and apecs but I might have broken something. --- sys/dev/sio/sio.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'sys/dev/sio/sio.c') diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index d5b48ce..683c59e 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sio.c,v 1.216 1998/09/26 13:59:26 peter Exp $ + * $Id: sio.c,v 1.217 1998/09/26 14:47:16 dfr Exp $ * from: @(#)com.c 7.5 (Berkeley) 5/16/91 * from: i386/isa sio.c,v 1.215 */ @@ -68,6 +68,7 @@ #include #include #include +#include #ifdef DEVFS #include #endif @@ -78,6 +79,7 @@ #include #include +#include #include @@ -921,6 +923,8 @@ sioattach(dev) int s; int unit; void *ih; + struct resource *res; + int zero = 0; u_int flags = isa_get_flags(dev); #if 0 @@ -1136,13 +1140,10 @@ determined_type: ; #endif com->flags = isa_get_flags(dev); /* Heritate id_flags for later */ - ih = BUS_CREATE_INTR(device_get_parent(dev), dev, - isa_get_irq(dev), - siointr, com); - if (!ih) - return ENXIO; - - BUS_CONNECT_INTR(device_get_parent(dev), ih); + res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, 0ul, ~0ul, 1, + RF_SHAREABLE | RF_ACTIVE); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, siointr, com, + &ih); return (0); } -- cgit v1.1