summaryrefslogtreecommitdiffstats
path: root/sys/isa/sio.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-11-15 18:25:17 +0000
committerdfr <dfr@FreeBSD.org>1998-11-15 18:25:17 +0000
commit3331f029dcf961b9a0c91921698fab3803776e51 (patch)
tree8e5245e8023a95c64c3eaa73287b1b208e40849a /sys/isa/sio.c
parent3c5010b4ae34919c54feb47ed85143578ae236cb (diff)
downloadFreeBSD-src-3331f029dcf961b9a0c91921698fab3803776e51.zip
FreeBSD-src-3331f029dcf961b9a0c91921698fab3803776e51.tar.gz
* 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.
Diffstat (limited to 'sys/isa/sio.c')
-rw-r--r--sys/isa/sio.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index d5b48ce..683c59e 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/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 <sys/syslog.h>
#include <sys/sysctl.h>
#include <sys/bus.h>
+#include <sys/rman.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -78,6 +79,7 @@
#include <machine/clock.h>
#include <machine/ipl.h>
+#include <machine/resource.h>
#include <isa/sioreg.h>
@@ -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);
}
OpenPOWER on IntegriCloud