diff options
author | Todd Poynor <tpoynor@com.rmk.(none)> | 2005-06-03 15:52:27 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-03 15:52:27 -0400 |
commit | 8775420d2fbcfff866995471ea5f6130d14d121c (patch) | |
tree | bef5911e6c02b5780a8d81e8db656177ff9b8c4a /arch/arm/mach-pxa/pxa27x.c | |
parent | 718a30a5cf0a9142f716a49853bd4b4a25a8da1b (diff) |
[PATCH] ARM: 2691/1: PXA27x sleep fixes take 2
Patch from Todd Poynor
PXA27x sleep fixes:
* set additional sleep/wakeup registers for Mainstone boards.
* move CKEN=0 to pxa25x-specific code; that value is harmful on pxa27x.
* save/restore additional registers, including some found necessary for
C5 processors and/or newer blob versions.
* enable future support of additional sleep modes for PXA27x (eg,
standby, deep sleep).
* split off cpu-specific sleep processing between pxa27x and pxa25x into
separate files (partly in preparation for additional sleep modes).
Includes fixes from David Burrage.
Signed-off-by: Todd Poynor
Signed-off-by: Nicolas Pitre
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 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 7e863afefb53..aa3c3b2ab75e 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -120,6 +120,38 @@ EXPORT_SYMBOL(get_clk_frequency_khz); | |||
120 | EXPORT_SYMBOL(get_memclk_frequency_10khz); | 120 | EXPORT_SYMBOL(get_memclk_frequency_10khz); |
121 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); | 121 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); |
122 | 122 | ||
123 | int pxa_cpu_pm_prepare(suspend_state_t state) | ||
124 | { | ||
125 | switch (state) { | ||
126 | case PM_SUSPEND_MEM: | ||
127 | return 0; | ||
128 | default: | ||
129 | return -EINVAL; | ||
130 | } | ||
131 | } | ||
132 | |||
133 | void pxa_cpu_pm_enter(suspend_state_t state) | ||
134 | { | ||
135 | extern void pxa_cpu_standby(void); | ||
136 | extern void pxa_cpu_suspend(unsigned int); | ||
137 | extern void pxa_cpu_resume(void); | ||
138 | |||
139 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER; | ||
140 | |||
141 | /* ensure voltage-change sequencer not initiated, which hangs */ | ||
142 | PCFR &= ~PCFR_FVC; | ||
143 | |||
144 | /* Clear edge-detect status register. */ | ||
145 | PEDR = 0xDF12FE1B; | ||
146 | |||
147 | switch (state) { | ||
148 | case PM_SUSPEND_MEM: | ||
149 | /* set resume return address */ | ||
150 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
151 | pxa_cpu_suspend(3); | ||
152 | break; | ||
153 | } | ||
154 | } | ||
123 | 155 | ||
124 | /* | 156 | /* |
125 | * device registration specific to PXA27x. | 157 | * device registration specific to PXA27x. |