aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-06-21 11:29:30 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-06-24 03:48:45 -0400
commita9503d2185bbc28e498c435a07f24986c48b5cbe (patch)
tree86987b72ceccea710fa67085f51c6083a9fc672e /arch/arm/mach-pxa/pxa3xx.c
parent372c0ac8aca7655b6a8920b10bf9563402ac19d8 (diff)
ARM: pm: pxa: move cpu_suspend into C code
We don't need a veneer for cpu_suspend, it can be called directly from C code now. Move it into the PXA CPU suspend functions, along with the accumulator register saving/restoring. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 8521d7d6f1da..220fd8c15dab 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -141,8 +141,13 @@ static void pxa3xx_cpu_pm_suspend(void)
141{ 141{
142 volatile unsigned long *p = (volatile void *)0xc0000000; 142 volatile unsigned long *p = (volatile void *)0xc0000000;
143 unsigned long saved_data = *p; 143 unsigned long saved_data = *p;
144#ifndef CONFIG_IWMMXT
145 u64 acc0;
144 146
145 extern void pxa3xx_cpu_suspend(long); 147 asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0));
148#endif
149
150 extern void pxa3xx_finish_suspend(unsigned long);
146 151
147 /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */ 152 /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */
148 CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM); 153 CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM);
@@ -162,11 +167,15 @@ static void pxa3xx_cpu_pm_suspend(void)
162 /* overwrite with the resume address */ 167 /* overwrite with the resume address */
163 *p = virt_to_phys(cpu_resume); 168 *p = virt_to_phys(cpu_resume);
164 169
165 pxa3xx_cpu_suspend(PLAT_PHYS_OFFSET - PAGE_OFFSET); 170 cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, 0, pxa3xx_finish_suspend);
166 171
167 *p = saved_data; 172 *p = saved_data;
168 173
169 AD3ER = 0; 174 AD3ER = 0;
175
176#ifndef CONFIG_IWMMXT
177 asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0));
178#endif
170} 179}
171 180
172static void pxa3xx_cpu_pm_enter(suspend_state_t state) 181static void pxa3xx_cpu_pm_enter(suspend_state_t state)