diff options
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 8521d7d6f1da..ef1c56a67afc 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/i2c/pxa-i2c.h> | 24 | #include <linux/i2c/pxa-i2c.h> |
25 | 25 | ||
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | #include <asm/suspend.h> | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <mach/gpio.h> | 29 | #include <mach/gpio.h> |
29 | #include <mach/pxa3xx-regs.h> | 30 | #include <mach/pxa3xx-regs.h> |
@@ -141,8 +142,13 @@ static void pxa3xx_cpu_pm_suspend(void) | |||
141 | { | 142 | { |
142 | volatile unsigned long *p = (volatile void *)0xc0000000; | 143 | volatile unsigned long *p = (volatile void *)0xc0000000; |
143 | unsigned long saved_data = *p; | 144 | unsigned long saved_data = *p; |
145 | #ifndef CONFIG_IWMMXT | ||
146 | u64 acc0; | ||
144 | 147 | ||
145 | extern void pxa3xx_cpu_suspend(long); | 148 | asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0)); |
149 | #endif | ||
150 | |||
151 | extern int pxa3xx_finish_suspend(unsigned long); | ||
146 | 152 | ||
147 | /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */ | 153 | /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */ |
148 | CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM); | 154 | CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM); |
@@ -162,11 +168,15 @@ static void pxa3xx_cpu_pm_suspend(void) | |||
162 | /* overwrite with the resume address */ | 168 | /* overwrite with the resume address */ |
163 | *p = virt_to_phys(cpu_resume); | 169 | *p = virt_to_phys(cpu_resume); |
164 | 170 | ||
165 | pxa3xx_cpu_suspend(PLAT_PHYS_OFFSET - PAGE_OFFSET); | 171 | cpu_suspend(0, pxa3xx_finish_suspend); |
166 | 172 | ||
167 | *p = saved_data; | 173 | *p = saved_data; |
168 | 174 | ||
169 | AD3ER = 0; | 175 | AD3ER = 0; |
176 | |||
177 | #ifndef CONFIG_IWMMXT | ||
178 | asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0)); | ||
179 | #endif | ||
170 | } | 180 | } |
171 | 181 | ||
172 | static void pxa3xx_cpu_pm_enter(suspend_state_t state) | 182 | static void pxa3xx_cpu_pm_enter(suspend_state_t state) |