diff options
Diffstat (limited to 'sys/arch/sparc64/dev/pckbc_ebus.c')
-rw-r--r-- | sys/arch/sparc64/dev/pckbc_ebus.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/sparc64/dev/pckbc_ebus.c b/sys/arch/sparc64/dev/pckbc_ebus.c index 59454d2bcd5..63408f88d1a 100644 --- a/sys/arch/sparc64/dev/pckbc_ebus.c +++ b/sys/arch/sparc64/dev/pckbc_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc_ebus.c,v 1.2 2002/04/08 17:49:42 jason Exp $ */ +/* $OpenBSD: pckbc_ebus.c,v 1.3 2003/02/17 01:29:20 henric Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -99,10 +99,10 @@ pckbc_ebus_attach(parent, self, aux) struct pckbc_ebus_softc *sc = (void *)self; struct pckbc_softc *psc = &sc->sc_pckbc; struct ebus_attach_args *ea = aux; - struct pckbc_internal *t; + struct pckbc_internal *t = NULL; int console; - sc->sc_iot = ea->ea_bustag; + sc->sc_iot = ea->ea_iotag; sc->sc_node = ea->ea_node; console = pckbc_ebus_is_console(sc); @@ -121,7 +121,8 @@ pckbc_ebus_attach(parent, self, aux) if (console == 0) { /* Use prom address if available, otherwise map it. */ if (ea->ea_nvaddrs) - sc->sc_ioh = (bus_space_handle_t)ea->ea_vaddrs[0]; + bus_space_map(sc->sc_iot, ea->ea_vaddrs[0], 0, 0, + &sc->sc_ioh); else if (ebus_bus_map(sc->sc_iot, 0, EBUS_PADDR_FROM_REG(&ea->ea_regs[0]), ea->ea_regs[0].size, BUS_SPACE_MAP_LINEAR, 0, &sc->sc_ioh) != 0) { @@ -146,14 +147,14 @@ pckbc_ebus_attach(parent, self, aux) psc->intr_establish = pckbc_ebus_intr_establish; - sc->sc_irq[0] = bus_intr_establish(ea->ea_bustag, ea->ea_intrs[0], + sc->sc_irq[0] = bus_intr_establish(ea->ea_iotag, ea->ea_intrs[0], IPL_TTY, 0, pckbcintr, psc); if (sc->sc_irq[0] == NULL) { printf(": couldn't get intr0\n"); return; } - sc->sc_irq[1] = bus_intr_establish(ea->ea_bustag, ea->ea_intrs[1], + sc->sc_irq[1] = bus_intr_establish(ea->ea_iotag, ea->ea_intrs[1], IPL_TTY, 0, pckbcintr, psc); if (sc->sc_irq[1] == NULL) { printf(": couldn't get intr1\n"); |