summaryrefslogtreecommitdiff
path: root/sys/arch/arm
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-30 21:37:54 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-30 21:37:54 +0000
commitcee99a5b83912f30e320d32732a97248b3b9395b (patch)
tree3975f543a34f060d102d7405549673e705a73371 /sys/arch/arm
parentb0fc800de7e8d3eaae874bc61f1b5cb7abcdf6c6 (diff)
Hurray! Zaurus apm can now call the activate functions intead of powerhooks.
We call the activate functions at splhigh; unfortunately we cannot suspend a zaurus at splhigh because on resume the clock is hosed. We accept this bug for now... perhaps someone can find it? (The powerhooks remain in place in the drivers, and will be roto-tilled once we all the other powerhook-using architectures have switched over) testing by myself and jakemsr; proof reading by oga
Diffstat (limited to 'sys/arch/arm')
-rw-r--r--sys/arch/arm/xscale/pxa2x0_apm.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_apm.c b/sys/arch/arm/xscale/pxa2x0_apm.c
index 02d5df269c6..4ac3fe336c8 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.33 2010/08/29 02:02:25 deraadt Exp $ */
+/* $OpenBSD: pxa2x0_apm.c,v 1.34 2010/08/30 21:37:52 deraadt Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -306,14 +306,14 @@ apm_power_info(struct pxa2x0_apm_softc *sc,
void
apm_suspend(struct pxa2x0_apm_softc *sc)
{
+ int s;
+
#if NWSDISPLAY > 0
wsdisplay_suspend();
#endif /* NWSDISPLAY > 0 */
resettodr();
- dopowerhooks(PWR_SUSPEND);
-
if (cold)
vfs_syncwait(0);
@@ -322,14 +322,21 @@ apm_suspend(struct pxa2x0_apm_softc *sc)
else
sc->sc_suspend(sc);
+ s = splhigh();
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_SUSPEND);
+ splx(s);
+
pxa2x0_apm_sleep(sc);
}
void
apm_resume(struct pxa2x0_apm_softc *sc)
{
+ int s;
- dopowerhooks(PWR_RESUME);
+ s = splhigh();
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_RESUME);
+ splx(s);
inittodr(0);