summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-09-23 18:04:06 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-09-23 18:04:06 +0000
commit77cbde2c89b28b7fca9cf8bda8b6d53d542f9312 (patch)
tree8ae57cfc0fba1da0df6177cbe11c6e13e7ce6683 /sys/arch/sparc64
parent1ae23ffc6f2b9532719b234caf241f3e7bbf2eb6 (diff)
Attempt mapping as io as well as mmio; necessary to make this work on a V100.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/dev/lom.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/lom.c b/sys/arch/sparc64/dev/lom.c
index 271fbf2d0ff..bcc7249b8a0 100644
--- a/sys/arch/sparc64/dev/lom.c
+++ b/sys/arch/sparc64/dev/lom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lom.c,v 1.8 2009/09/23 17:53:38 kettenis Exp $ */
+/* $OpenBSD: lom.c,v 1.9 2009/09/23 18:04:05 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -173,10 +173,15 @@ lom_attach(struct device *parent, struct device *self, void *aux)
uint8_t cal, low, len;
int i;
- sc->sc_iot = ea->ea_memtag;
- if (ebus_bus_map(ea->ea_memtag, 0,
+ if (ebus_bus_map(ea->ea_iotag, 0,
EBUS_PADDR_FROM_REG(&ea->ea_regs[0]),
- ea->ea_regs[0].size, 0, 0, &sc->sc_ioh)) {
+ ea->ea_regs[0].size, 0, 0, &sc->sc_ioh) == 0) {
+ sc->sc_iot = ea->ea_iotag;
+ } else if (ebus_bus_map(ea->ea_memtag, 0,
+ EBUS_PADDR_FROM_REG(&ea->ea_regs[0]),
+ ea->ea_regs[0].size, 0, 0, &sc->sc_ioh) == 0) {
+ sc->sc_iot = ea->ea_memtag;
+ } else {
printf(": can't map register space\n");
return;
}