From 77cbde2c89b28b7fca9cf8bda8b6d53d542f9312 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 23 Sep 2009 18:04:06 +0000 Subject: Attempt mapping as io as well as mmio; necessary to make this work on a V100. --- sys/arch/sparc64/dev/lom.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sys/arch') 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; } -- cgit v1.2.3