summaryrefslogtreecommitdiff
path: root/sys/arch/zaurus/dev/zaurus_apm.c
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2005-10-31 04:56:15 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2005-10-31 04:56:15 +0000
commit27bd33adf110e69f50421a7db1906522e388aa81 (patch)
treeacce2355872002ffc3d539bc8ff79b21c4013b0f /sys/arch/zaurus/dev/zaurus_apm.c
parent37f3c5806a6bd8f06216f56000d00c829365e2b7 (diff)
On suspend/resume save the current time to the RTC earlier and restore it later
so that the very long delay operations do not slow the clock unnecessarily. Add early support for hw.setperf and hw.cpuspeed for zaurus, it appears to be able to run at 91MHz and 209MHz as well as the std 416MHz with this change. Hopefully it is doing the speed changes correctly.
Diffstat (limited to 'sys/arch/zaurus/dev/zaurus_apm.c')
-rw-r--r--sys/arch/zaurus/dev/zaurus_apm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/zaurus/dev/zaurus_apm.c b/sys/arch/zaurus/dev/zaurus_apm.c
index feedff79b1e..6ae4960c825 100644
--- a/sys/arch/zaurus/dev/zaurus_apm.c
+++ b/sys/arch/zaurus/dev/zaurus_apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_apm.c,v 1.8 2005/05/27 05:14:41 uwe Exp $ */
+/* $OpenBSD: zaurus_apm.c,v 1.9 2005/10/31 04:56:14 drahn Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
@@ -21,6 +21,7 @@
#include <sys/kernel.h>
#include <sys/timeout.h>
#include <sys/conf.h>
+#include <sys/sysctl.h>
#include <arm/xscale/pxa2x0reg.h>
#include <arm/xscale/pxa2x0var.h>
@@ -146,6 +147,7 @@ int zapm_get_event(struct pxa2x0_apm_softc *, u_int *);
void zapm_power_info(struct pxa2x0_apm_softc *, struct apm_power_info *);
void zapm_suspend(struct pxa2x0_apm_softc *);
int zapm_resume(struct pxa2x0_apm_softc *);
+int pxa2x0_setperf(int);
int
@@ -191,6 +193,8 @@ apm_attach(struct device *parent, struct device *self, void *aux)
#if 0
(void)shutdownhook_establish(zapm_shutdown, NULL);
#endif
+
+ cpu_setperf = pxa2x0_setperf;
}
#if 0