aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa27x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/pxa27x.c')
-rw-r--r--arch/arm/mach-pxa/pxa27x.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index c54ad8b3343c..ec68cc16b4e3 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -204,6 +204,23 @@ static struct clk_lookup pxa27x_clkregs[] = {
204#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 204#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x]
205 205
206/* 206/*
207 * allow platforms to override default PWRMODE setting used for PM_SUSPEND_MEM
208 */
209static unsigned int pwrmode = PWRMODE_SLEEP;
210
211int __init pxa27x_set_pwrmode(unsigned int mode)
212{
213 switch (mode) {
214 case PWRMODE_SLEEP:
215 case PWRMODE_DEEPSLEEP:
216 pwrmode = mode;
217 return 0;
218 }
219
220 return -EINVAL;
221}
222
223/*
207 * List of global PXA peripheral registers to preserve. 224 * List of global PXA peripheral registers to preserve.
208 * More ones like CP and general purpose register values are preserved 225 * More ones like CP and general purpose register values are preserved
209 * with the stack pointer in sleep.S. 226 * with the stack pointer in sleep.S.
@@ -254,7 +271,7 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)
254 pxa_cpu_standby(); 271 pxa_cpu_standby();
255 break; 272 break;
256 case PM_SUSPEND_MEM: 273 case PM_SUSPEND_MEM:
257 pxa27x_cpu_suspend(PWRMODE_SLEEP); 274 pxa27x_cpu_suspend(pwrmode);
258 break; 275 break;
259 } 276 }
260} 277}