diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2005-03-30 14:02:04 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2005-03-30 14:02:04 +0000 |
commit | c593492063adad7596bea476f7ca7656c6ec3f33 (patch) | |
tree | 91e61e1ee77ea5fa73bdb3a349e000cbf29033fa /sys/arch | |
parent | 0b6d27832ef6d0e331b4660db5272c34ae508242 (diff) |
make the powerhooks the responsibility of the bus ohci is attached to
ok uwe@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_ohci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_ohci.c b/sys/arch/arm/xscale/pxa2x0_ohci.c index 753213ec4f3..a635a003e68 100644 --- a/sys/arch/arm/xscale/pxa2x0_ohci.c +++ b/sys/arch/arm/xscale/pxa2x0_ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_ohci.c,v 1.13 2005/02/23 13:17:29 dlg Exp $ */ +/* $OpenBSD: pxa2x0_ohci.c,v 1.14 2005/03/30 14:02:02 dlg Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -127,12 +127,12 @@ pxaohci_attach(struct device *parent, struct device *self, void *aux) sc->sc.sc_bus.bdev.dv_xname, r); bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size); sc->sc.sc_size = 0; - pxa2x0_intr_disestablish(sc->sc_ih); - sc->sc_ih = NULL; pxa2x0_clkman_config(CKEN_USBHC, 0); return; } + sc->sc.sc_powerhook = powerhook_establish(ohci_power, &sc->sc); + sc->sc_ih = pxa2x0_intr_establish(PXA2X0_INT_USBH1, IPL_USB, ohci_intr, sc, sc->sc.sc_bus.bdev.dv_xname); @@ -150,6 +150,7 @@ pxaohci_detach(struct device *self, int flags) rv = ohci_detach(&sc->sc, flags); if (rv) return (rv); + powerhook_disestablish(sc->sc.sc_powerhook); if (sc->sc_ih != NULL) { pxa2x0_intr_disestablish(sc->sc_ih); |