aboutsummaryrefslogtreecommitdiffstats
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 07:55:04 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-09 11:32:52 -0400
commit4104980a3c21801f701e53961375b3d736ee9a73 (patch)
treef2c0b6759e45fd696a138a4ff32caabc513f32af /arch/arm/mach-pxa/pm.c
parent63bef5473892ae683a9e989975180a5754b0ae33 (diff)
[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)
86 return -EINVAL; 86 return -EINVAL;
87} 87}
88 88
89static int pxa_pm_prepare(void)
90{
91 int ret = 0;
92
93 if (pxa_cpu_pm_fns && pxa_cpu_pm_fns->prepare)
94 ret = pxa_cpu_pm_fns->prepare();
95
96 return ret;
97}
98
99static void pxa_pm_finish(void)
100{
101 if (pxa_cpu_pm_fns && pxa_cpu_pm_fns->finish)
102 pxa_cpu_pm_fns->finish();
103}
104
89static struct platform_suspend_ops pxa_pm_ops = { 105static struct platform_suspend_ops pxa_pm_ops = {
90 .valid = pxa_pm_valid, 106 .valid = pxa_pm_valid,
91 .enter = pxa_pm_enter, 107 .enter = pxa_pm_enter,
108 .prepare = pxa_pm_prepare,
109 .finish = pxa_pm_finish,
92}; 110};
93 111
94static int __init pxa_pm_init(void) 112static int __init pxa_pm_init(void)