diff options
author | Todd Poynor <tpoynor@mvista.com> | 2005-07-01 06:27:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-07-01 06:27:05 -0400 |
commit | 26705ca46bdf81113cc6729eb12b9eee2263bbfc (patch) | |
tree | f49950ea17fbdec406404144ee264fa3c6ad5c61 /arch/arm/mach-pxa/pxa27x.c | |
parent | 62351cc38d3eaf3de0327054dd6ebc039f4da80d (diff) |
[PATCH] ARM: 2781/2: PXA27x Standby mode take 2
Patch from Todd Poynor
Add support for PXA27x Standby mode, a low-power mode that retains CPU
and some peripheral state (the existing "sleep" mode is a power-power
mode that retains less state). Activated via:
echo -n standby > /sys/power/state
From: David Burrage and Todd Poynor
Signed-off-by: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pxa27x.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 893964fb9659..9a791b07118d 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -126,6 +126,7 @@ int pxa_cpu_pm_prepare(suspend_state_t state) | |||
126 | { | 126 | { |
127 | switch (state) { | 127 | switch (state) { |
128 | case PM_SUSPEND_MEM: | 128 | case PM_SUSPEND_MEM: |
129 | case PM_SUSPEND_STANDBY: | ||
129 | return 0; | 130 | return 0; |
130 | default: | 131 | default: |
131 | return -EINVAL; | 132 | return -EINVAL; |
@@ -138,7 +139,10 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
138 | extern void pxa_cpu_suspend(unsigned int); | 139 | extern void pxa_cpu_suspend(unsigned int); |
139 | extern void pxa_cpu_resume(void); | 140 | extern void pxa_cpu_resume(void); |
140 | 141 | ||
141 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER; | 142 | if (state == PM_SUSPEND_STANDBY) |
143 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER | CKEN16_LCD |CKEN0_PWM0; | ||
144 | else | ||
145 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER; | ||
142 | 146 | ||
143 | /* ensure voltage-change sequencer not initiated, which hangs */ | 147 | /* ensure voltage-change sequencer not initiated, which hangs */ |
144 | PCFR &= ~PCFR_FVC; | 148 | PCFR &= ~PCFR_FVC; |
@@ -147,6 +151,9 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
147 | PEDR = 0xDF12FE1B; | 151 | PEDR = 0xDF12FE1B; |
148 | 152 | ||
149 | switch (state) { | 153 | switch (state) { |
154 | case PM_SUSPEND_STANDBY: | ||
155 | pxa_cpu_standby(); | ||
156 | break; | ||
150 | case PM_SUSPEND_MEM: | 157 | case PM_SUSPEND_MEM: |
151 | /* set resume return address */ | 158 | /* set resume return address */ |
152 | PSPR = virt_to_phys(pxa_cpu_resume); | 159 | PSPR = virt_to_phys(pxa_cpu_resume); |