diff options
Diffstat (limited to 'sys/arch/sparc64/dev/lpt_ebus.c')
-rw-r--r-- | sys/arch/sparc64/dev/lpt_ebus.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/arch/sparc64/dev/lpt_ebus.c b/sys/arch/sparc64/dev/lpt_ebus.c index d51c64898d8..15d7f500c3e 100644 --- a/sys/arch/sparc64/dev/lpt_ebus.c +++ b/sys/arch/sparc64/dev/lpt_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpt_ebus.c,v 1.6 2002/07/18 02:20:17 jason Exp $ */ +/* $OpenBSD: lpt_ebus.c,v 1.7 2003/02/17 01:29:20 henric Exp $ */ /* $NetBSD: lpt_ebus.c,v 1.8 2002/03/01 11:51:00 martin Exp $ */ /* @@ -80,13 +80,18 @@ lpt_ebus_attach(parent, self, aux) struct lpt_ebus_softc *sc = (void *)self; struct ebus_attach_args *ea = aux; - sc->sc_lpt.sc_iot = ea->ea_bustag; - if (ebus_bus_map(sc->sc_lpt.sc_iot, 0, + if (ebus_bus_map(ea->ea_memtag, 0, EBUS_PADDR_FROM_REG(&ea->ea_regs[0]), ea->ea_regs[0].size, - BUS_SPACE_MAP_LINEAR, 0, &sc->sc_lpt.sc_ioh) != 0) { + 0, 0, &sc->sc_lpt.sc_ioh) == 0) { + sc->sc_lpt.sc_iot = ea->ea_memtag; + } else 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_lpt.sc_ioh) == 0) { + sc->sc_lpt.sc_iot = ea->ea_iotag; + } else { printf(": can't map register space\n"); - return; + return; } if (ebus_bus_map(sc->sc_lpt.sc_iot, 0, |