diff options
Diffstat (limited to 'sys/arch/arm/xscale')
-rw-r--r-- | sys/arch/arm/xscale/pxa27x_udc.c | 26 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa27x_udc.h | 1 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0.c | 5 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_com.c | 29 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_lcd.c | 18 |
5 files changed, 40 insertions, 39 deletions
diff --git a/sys/arch/arm/xscale/pxa27x_udc.c b/sys/arch/arm/xscale/pxa27x_udc.c index ab417857403..9f2d4a014eb 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.25 2010/08/27 05:04:06 deraadt Exp $ */ +/* $OpenBSD: pxa27x_udc.c,v 1.26 2010/08/30 21:35:55 deraadt Exp $ */ /* * Copyright (c) 2007 Dale Rahn <drahn@openbsd.org> @@ -52,7 +52,7 @@ struct pxaudc_pipe { // LIST_ENTRY(pxaudc_pipe) list; }; -void pxaudc_power(int, void *); +void pxaudc_powerhook(int, void *); void pxaudc_enable(struct pxaudc_softc *); void pxaudc_disable(struct pxaudc_softc *); @@ -200,7 +200,7 @@ pxaudc_attach(struct pxaudc_softc *sc, void *aux) return; } - sc->sc_powerhook = powerhook_establish(pxaudc_power, sc); + sc->sc_powerhook = powerhook_establish(pxaudc_powerhook, sc); /* Set up the bus struct. */ sc->sc_bus.methods = &pxaudc_bus_methods; @@ -245,20 +245,26 @@ pxaudc_detach(struct pxaudc_softc *sc, int flags) return (0); } -void -pxaudc_power(int why, void *arg) +int +pxaudc_activate(struct pxaudc_softc *self, int act) { - struct pxaudc_softc *sc = (struct pxaudc_softc *)arg; + struct pxaudc_softc *sc = (struct pxaudc_softc *)self; - switch (why) { - case PWR_SUSPEND: + switch (act) { + case DVACT_SUSPEND: pxaudc_disable(sc); break; - - case PWR_RESUME: + case DVACT_RESUME: pxaudc_enable(sc); break; } + return 0; +} + +void +pxaudc_powerhook(int why, void *arg) +{ + pxaudc_activate(arg, why); } /* diff --git a/sys/arch/arm/xscale/pxa27x_udc.h b/sys/arch/arm/xscale/pxa27x_udc.h index db34ebd3783..4dbe728af6f 100644 --- a/sys/arch/arm/xscale/pxa27x_udc.h +++ b/sys/arch/arm/xscale/pxa27x_udc.h @@ -65,3 +65,4 @@ struct pxaudc_softc { int pxaudc_match(void); void pxaudc_attach(struct pxaudc_softc *, void *); int pxaudc_detach(struct pxaudc_softc *, int); +int pxaudc_activate(struct pxaudc_softc *, int); diff --git a/sys/arch/arm/xscale/pxa2x0.c b/sys/arch/arm/xscale/pxa2x0.c index 6c2ccec9e01..ce543461ba2 100644 --- a/sys/arch/arm/xscale/pxa2x0.c +++ b/sys/arch/arm/xscale/pxa2x0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0.c,v 1.15 2008/11/22 17:08:03 drahn Exp $ */ +/* $OpenBSD: pxa2x0.c,v 1.16 2010/08/30 21:35:55 deraadt Exp $ */ /* $NetBSD: pxa2x0.c,v 1.5 2003/12/12 16:42:44 thorpej Exp $ */ /* @@ -129,7 +129,8 @@ CFATTACH_DECL(pxaip, sizeof(struct pxaip_softc), pxaip_match, pxaip_attach, NULL, NULL); #else struct cfattach pxaip_ca = { - sizeof(struct pxaip_softc), pxaip_match, pxaip_attach + sizeof(struct pxaip_softc), pxaip_match, pxaip_attach, NULL, + config_activate_children }; struct cfdriver pxaip_cd = { diff --git a/sys/arch/arm/xscale/pxa2x0_com.c b/sys/arch/arm/xscale/pxa2x0_com.c index ac3adc38da3..c14344ce10b 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.10 2010/08/27 05:04:06 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_com.c,v 1.11 2010/08/30 21:35:55 deraadt Exp $ */ /* $NetBSD: pxa2x0_com.c,v 1.4 2003/07/15 00:24:55 lukem Exp $ */ /* @@ -63,10 +63,12 @@ int pxauart_match(struct device *, void *, void *); void pxauart_attach(struct device *, struct device *, void *); -void pxauart_power(int why, 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 + sizeof (struct com_softc), pxauart_match, pxauart_attach, NULL, + pxauart_activate }; int @@ -144,25 +146,25 @@ 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_power, sc); + (void)powerhook_establish(pxauart_powerhook, sc); } -void -pxauart_power(int why, void *arg) +int +pxauart_activate(struct device *self, int act) { - struct com_softc *sc = arg; + struct com_softc *sc = (struct com_softc *)self; bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; struct tty *tp = sc->sc_tty; - switch (why) { - case PWR_SUSPEND: + switch (act) { + case DVACT_SUSPEND: #ifdef __zaurus__ if (sc->enabled && ISSET(sc->sc_hwflags, COM_HW_SIR)) scoop_set_irled(0); #endif break; - case PWR_RESUME: + case DVACT_RESUME: if (sc->enabled) { sc->sc_initialize = 1; comparam(tp, &tp->t_termios); @@ -178,4 +180,11 @@ pxauart_power(int why, void *arg) } break; } + return 0; +} + +void +pxauart_powerhook(int why, void *arg) +{ + pxauart_activate(arg, why); } diff --git a/sys/arch/arm/xscale/pxa2x0_lcd.c b/sys/arch/arm/xscale/pxa2x0_lcd.c index 835425f37bc..d465256341c 100644 --- a/sys/arch/arm/xscale/pxa2x0_lcd.c +++ b/sys/arch/arm/xscale/pxa2x0_lcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_lcd.c,v 1.23 2010/08/27 05:04:06 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_lcd.c,v 1.24 2010/08/30 21:35:55 deraadt Exp $ */ /* $NetBSD: pxa2x0_lcd.c,v 1.8 2003/10/03 07:24:05 bsh Exp $ */ /* @@ -843,19 +843,3 @@ pxa2x0_lcd_resume(struct pxa2x0_lcd_softc *sc) pxa2x0_lcd_start_dma(sc->iot, sc->ioh, sc->active); } } - -void -pxa2x0_lcd_power(int why, void *v) -{ - struct pxa2x0_lcd_softc *sc = v; - - switch (why) { - case PWR_SUSPEND: - pxa2x0_lcd_suspend(sc); - break; - - case PWR_RESUME: - pxa2x0_lcd_resume(sc); - break; - } -} |