diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-09-07 16:21:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-09-07 16:21:48 +0000 |
commit | 0909b33ee356b8b24e8cfd8ef9abfcce75eac449 (patch) | |
tree | 60b4dbc9eaed4dfda443b0bf3fa9ec06a75b03ad /sys/arch/arm/xscale | |
parent | 06c96fb315950bff13bd7a73d355ebdc21e85191 (diff) |
remove the powerhook code. All architectures now use the ca_activate tree
traversal code to suspend/resume
ok oga kettenis blambert
Diffstat (limited to 'sys/arch/arm/xscale')
-rw-r--r-- | sys/arch/arm/xscale/pxa27x_udc.c | 15 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa27x_udc.h | 1 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_apm.c | 4 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_com.c | 11 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_ohci.c | 23 |
5 files changed, 7 insertions, 47 deletions
diff --git a/sys/arch/arm/xscale/pxa27x_udc.c b/sys/arch/arm/xscale/pxa27x_udc.c index 9f2d4a014eb..23a06d39a6f 100644 --- a/sys/arch/arm/xscale/pxa27x_udc.c +++ b/sys/arch/arm/xscale/pxa27x_udc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa27x_udc.c,v 1.26 2010/08/30 21:35:55 deraadt Exp $ */ +/* $OpenBSD: pxa27x_udc.c,v 1.27 2010/09/07 16:21:35 deraadt Exp $ */ /* * Copyright (c) 2007 Dale Rahn <drahn@openbsd.org> @@ -52,8 +52,6 @@ struct pxaudc_pipe { // LIST_ENTRY(pxaudc_pipe) list; }; -void pxaudc_powerhook(int, void *); - void pxaudc_enable(struct pxaudc_softc *); void pxaudc_disable(struct pxaudc_softc *); void pxaudc_read_ep0(struct pxaudc_softc *, usbf_xfer_handle); @@ -200,8 +198,6 @@ pxaudc_attach(struct pxaudc_softc *sc, void *aux) return; } - sc->sc_powerhook = powerhook_establish(pxaudc_powerhook, sc); - /* Set up the bus struct. */ sc->sc_bus.methods = &pxaudc_bus_methods; sc->sc_bus.pipe_size = sizeof(struct pxaudc_pipe); @@ -228,9 +224,6 @@ pxaudc_attach(struct pxaudc_softc *sc, void *aux) int pxaudc_detach(struct pxaudc_softc *sc, int flags) { - if (sc->sc_powerhook != NULL) - powerhook_disestablish(sc->sc_powerhook); - if (sc->sc_conn_ih != NULL) pxa2x0_gpio_intr_disestablish(sc->sc_conn_ih); @@ -261,12 +254,6 @@ pxaudc_activate(struct pxaudc_softc *self, int act) return 0; } -void -pxaudc_powerhook(int why, void *arg) -{ - pxaudc_activate(arg, why); -} - /* * Register manipulation */ diff --git a/sys/arch/arm/xscale/pxa27x_udc.h b/sys/arch/arm/xscale/pxa27x_udc.h index 4dbe728af6f..c7a48149825 100644 --- a/sys/arch/arm/xscale/pxa27x_udc.h +++ b/sys/arch/arm/xscale/pxa27x_udc.h @@ -32,7 +32,6 @@ struct pxaudc_softc { bus_size_t sc_size; void *sc_ih; void *sc_conn_ih; - void *sc_powerhook; SIMPLEQ_HEAD(,usbf_xfer) sc_free_xfers; /* recycled xfers */ u_int32_t sc_icr0; /* enabled EP interrupts */ u_int32_t sc_icr1; /* enabled EP interrupts */ diff --git a/sys/arch/arm/xscale/pxa2x0_apm.c b/sys/arch/arm/xscale/pxa2x0_apm.c index 4ac3fe336c8..d9a153c6452 100644 --- a/sys/arch/arm/xscale/pxa2x0_apm.c +++ b/sys/arch/arm/xscale/pxa2x0_apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_apm.c,v 1.34 2010/08/30 21:37:52 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_apm.c,v 1.35 2010/09/07 16:21:35 deraadt Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -342,7 +342,7 @@ apm_resume(struct pxa2x0_apm_softc *sc) /* * Clear the OTG Peripheral hold after running the pxaudc and pxaohci - * powerhooks to re-enable their operation. See 3.8.1.2 + * ca_activate to re-enable their operation. See 3.8.1.2 */ /* XXX ifdef NPXAUDC > 0 */ bus_space_write_4(sc->sc_iot, sc->sc_pm_ioh, POWMAN_PSSR, PSSR_OTGPH); diff --git a/sys/arch/arm/xscale/pxa2x0_com.c b/sys/arch/arm/xscale/pxa2x0_com.c index c14344ce10b..64a65bd880d 100644 --- a/sys/arch/arm/xscale/pxa2x0_com.c +++ b/sys/arch/arm/xscale/pxa2x0_com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_com.c,v 1.11 2010/08/30 21:35:55 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_com.c,v 1.12 2010/09/07 16:21:35 deraadt Exp $ */ /* $NetBSD: pxa2x0_com.c,v 1.4 2003/07/15 00:24:55 lukem Exp $ */ /* @@ -64,7 +64,6 @@ int pxauart_match(struct device *, void *, void *); void pxauart_attach(struct device *, struct device *, void *); int pxauart_activate(struct device *, int); -void pxauart_powerhook(int why, void *); struct cfattach com_pxaip_ca = { sizeof (struct com_softc), pxauart_match, pxauart_attach, NULL, @@ -145,8 +144,6 @@ pxauart_attach(struct device *parent, struct device *self, void *aux) (void)pxa2x0_intr_establish(pxa->pxa_intr, IPL_TTY, comintr, sc, sc->sc_dev.dv_xname); - - (void)powerhook_establish(pxauart_powerhook, sc); } int @@ -182,9 +179,3 @@ pxauart_activate(struct device *self, int act) } return 0; } - -void -pxauart_powerhook(int why, void *arg) -{ - pxauart_activate(arg, why); -} diff --git a/sys/arch/arm/xscale/pxa2x0_ohci.c b/sys/arch/arm/xscale/pxa2x0_ohci.c index 1ca904c5bab..74fb6b51c82 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.23 2010/08/30 21:30:15 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_ohci.c,v 1.24 2010/09/07 16:21:35 deraadt Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -41,7 +41,6 @@ int pxaohci_match(struct device *, void *, void *); void pxaohci_attach(struct device *, struct device *, void *); int pxaohci_detach(struct device *, int); int pxaohci_activate(struct device *, int); -void pxaohci_powerhook(int, void *); struct pxaohci_softc { ohci_softc_t sc; @@ -127,11 +126,6 @@ unsupported: return; } - sc->sc.sc_powerhook = powerhook_establish(pxaohci_powerhook, sc); - if (sc->sc.sc_powerhook == NULL) - printf("%s: cannot establish powerhook\n", - sc->sc.sc_bus.bdev.dv_xname); - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, usbctlprint); } @@ -146,11 +140,6 @@ pxaohci_detach(struct device *self, int flags) if (rv) return (rv); - if (sc->sc.sc_powerhook != NULL) { - powerhook_disestablish(sc->sc.sc_powerhook); - sc->sc.sc_powerhook = NULL; - } - if (sc->sc_ih != NULL) { pxa2x0_intr_disestablish(sc->sc_ih); sc->sc_ih = NULL; @@ -178,7 +167,7 @@ pxaohci_activate(struct device *self, int act) switch (act) { case DVACT_SUSPEND: sc->sc.sc_bus.use_polling++; - ohci_powerhook(act, &sc->sc); + ohci_activate((struct device *)&sc->sc, act); pxa2x0_clkman_config(CKEN_USBHC, 0); sc->sc.sc_bus.use_polling--; break; @@ -186,7 +175,7 @@ pxaohci_activate(struct device *self, int act) sc->sc.sc_bus.use_polling++; pxa2x0_clkman_config(CKEN_USBHC, 1); pxaohci_enable(sc); - ohci_powerhook(act, &sc->sc); + ohci_activate((struct device *)&sc->sc, act); sc->sc.sc_bus.use_polling--; break; } @@ -194,12 +183,6 @@ pxaohci_activate(struct device *self, int act) } void -pxaohci_powerhook(int why, void *arg) -{ - pxaohci_activate(arg, why); -} - -void pxaohci_enable(struct pxaohci_softc *sc) { u_int32_t hr; |