aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 8521d7d6f1d..b5cd9e5aba3 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>
@@ -31,7 +32,6 @@
31#include <mach/ohci.h> 32#include <mach/ohci.h>
32#include <mach/pm.h> 33#include <mach/pm.h>
33#include <mach/dma.h> 34#include <mach/dma.h>
34#include <mach/regs-intc.h>
35#include <mach/smemc.h> 35#include <mach/smemc.h>
36 36
37#include "generic.h" 37#include "generic.h"
@@ -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 int 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, 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)
@@ -328,13 +337,13 @@ static void pxa_ack_ext_wakeup(struct irq_data *d)
328 337
329static void pxa_mask_ext_wakeup(struct irq_data *d) 338static void pxa_mask_ext_wakeup(struct irq_data *d)
330{ 339{
331 ICMR2 &= ~(1 << ((d->irq - PXA_IRQ(0)) & 0x1f)); 340 pxa_mask_irq(d);
332 PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0); 341 PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0);
333} 342}
334 343
335static void pxa_unmask_ext_wakeup(struct irq_data *d) 344static void pxa_unmask_ext_wakeup(struct irq_data *d)
336{ 345{
337 ICMR2 |= 1 << ((d->irq - PXA_IRQ(0)) & 0x1f); 346 pxa_unmask_irq(d);
338 PECR |= PECR_IE(d->irq - IRQ_WAKEUP0); 347 PECR |= PECR_IE(d->irq - IRQ_WAKEUP0);
339} 348}
340 349