summaryrefslogtreecommitdiff
path: root/sys/dev/sbus/magma.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-01-12 21:30:57 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-01-12 21:30:57 +0000
commit07da394b640372c39ffc74f48e369307686e16c6 (patch)
treedc795e11ee11cc69e6a9c0d7ad485aa5b597c974 /sys/dev/sbus/magma.c
parentb197030b5af1d0d15656f931296f406b9018c6c8 (diff)
House cleaning: removing some leftover sparc bits and such
Diffstat (limited to 'sys/dev/sbus/magma.c')
-rw-r--r--sys/dev/sbus/magma.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c
index 62cc6c0c55e..893e56704d8 100644
--- a/sys/dev/sbus/magma.c
+++ b/sys/dev/sbus/magma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: magma.c,v 1.1 2002/01/12 20:19:40 jason Exp $ */
+/* $OpenBSD: magma.c,v 1.2 2002/01/12 21:30:56 jason Exp $ */
/*
* magma.c
*
@@ -66,19 +66,6 @@
#include <dev/sbus/magmareg.h>
-/*
- * Select tty soft interrupt bit based on TTY ipl. (stole from zs.c)
- */
-#if PIL_TTY == 1
-# define IE_MSOFT IE_L1
-#elif PIL_TTY == 4
-# define IE_MSOFT IE_L4
-#elif PIL_TTY == 6
-# define IE_MSOFT IE_L6
-#else
-# error "no suitable software interrupt bit"
-#endif
-
/* supported cards
*
* The table below lists the cards that this driver is likely to
@@ -330,7 +317,6 @@ magma_attach(parent, dev, aux)
struct magma_board_info *card = supported_cards;
char *magma_prom = getpropstring(sa->sa_node, "magma_prom");
int chip;
- void *base;
/* find the card type */
while (card->mb_name && strcmp(magma_prom, card->mb_name))
@@ -449,9 +435,14 @@ magma_attach(parent, dev, aux)
/* init the cd1190 chips */
for (chip = 0 ; chip < card->mb_ncd1190 ; chip++) {
- struct cd1190 *cd = &sc->ms_cd1190[chip];
+ struct cd1190 *cd = &sc->ms_cd1190[chip];
- cd->cd_reg = base + card->mb_cd1190[chip];
+ if (bus_space_subregion(sc->sc_bustag, sc->sc_iohandle,
+ card->mb_cd1190[chip], CD1400_REGMAPSIZE, &cd->cd_regh)) {
+ printf(": failed to map cd1400 regs\n");
+ return;
+ }
+ cd->cd_regt = sc->sc_bustag;
dprintf(("%s attach CD1190 %d addr 0x%x (failed)\n", sc->ms_dev.dv_xname, chip, cd->cd_reg));
/* XXX don't know anything about these chips yet */
}