summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/pm.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-08-27 15:55:04 +0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-09 19:32:52 +0400
commit4104980a3c21801f701e53961375b3d736ee9a73 (patch)
treef2c0b6759e45fd696a138a4ff32caabc513f32af /arch/arm/mach-pxa/pm.c
parent63bef5473892ae683a9e989975180a5754b0ae33 (diff)
downloadlinux-4104980a3c21801f701e53961375b3d736ee9a73.tar.xz
[ARM] pxa: Allow platforms to override PSPR setting
Currently, we set PSPR just before entering sleep mode. However, some platforms have different requirements for setting PSPR in order to properly wake up. Set PSPR earlier in the suspend cycle so that platforms can change the setting by using a sysdev driver instead. Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pm.c')
-rw-r--r--arch/arm/mach-pxa/pm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 1b539e675579..164eb0bb6321 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -86,9 +86,27 @@ static int pxa_pm_valid(suspend_state_t state)
return -EINVAL;
}
+static int pxa_pm_prepare(void)
+{
+ int ret = 0;
+
+ if (pxa_cpu_pm_fns && pxa_cpu_pm_fns->prepare)
+ ret = pxa_cpu_pm_fns->prepare();
+
+ return ret;
+}
+
+static void pxa_pm_finish(void)
+{
+ if (pxa_cpu_pm_fns && pxa_cpu_pm_fns->finish)
+ pxa_cpu_pm_fns->finish();
+}
+
static struct platform_suspend_ops pxa_pm_ops = {
.valid = pxa_pm_valid,
.enter = pxa_pm_enter,
+ .prepare = pxa_pm_prepare,
+ .finish = pxa_pm_finish,
};
static int __init pxa_pm_init(void)