aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sio
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1998-11-15 18:25:17 +0000
committerDoug Rabson <dfr@FreeBSD.org>1998-11-15 18:25:17 +0000
commit08b6a4cbee427b68518039a35579f86d2e646bb9 (patch)
treefd54512c9c731113c4672699fae373a27076692f /sys/dev/sio
parent128d4f3960c20175f0c33050be82862db5378087 (diff)
downloadsrc-08b6a4cbee427b68518039a35579f86d2e646bb9.tar.gz
src-08b6a4cbee427b68518039a35579f86d2e646bb9.zip
* 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.
Notes
Notes: svn path=/head/; revision=41181
Diffstat (limited to 'sys/dev/sio')
-rw-r--r--sys/dev/sio/sio.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index d5b48cee1ecb..683c59ea3fb0 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 <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);
}