diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-21 16:29:30 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-24 08:48:45 +0100 |
commit | a9503d2185bbc28e498c435a07f24986c48b5cbe (patch) | |
tree | 86987b72ceccea710fa67085f51c6083a9fc672e /arch/arm/mach-pxa/pxa3xx.c | |
parent | 372c0ac8aca7655b6a8920b10bf9563402ac19d8 (diff) | |
download | linux-a9503d2185bbc28e498c435a07f24986c48b5cbe.tar.bz2 |
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.c | 13 |
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) { volatile unsigned long *p = (volatile void *)0xc0000000; unsigned long saved_data = *p; +#ifndef CONFIG_IWMMXT + u64 acc0; - extern void pxa3xx_cpu_suspend(long); + asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0)); +#endif + + extern void pxa3xx_finish_suspend(unsigned long); /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */ CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM); @@ -162,11 +167,15 @@ static void pxa3xx_cpu_pm_suspend(void) /* overwrite with the resume address */ *p = virt_to_phys(cpu_resume); - pxa3xx_cpu_suspend(PLAT_PHYS_OFFSET - PAGE_OFFSET); + cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, 0, pxa3xx_finish_suspend); *p = saved_data; AD3ER = 0; + +#ifndef CONFIG_IWMMXT + asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0)); +#endif } static void pxa3xx_cpu_pm_enter(suspend_state_t state) |