aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/mfp-pxa2xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/mfp-pxa2xx.c')
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index 7ffb91d64c39..cf6b720c055f 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -322,6 +322,7 @@ static inline void pxa27x_mfp_init(void) {}
322#ifdef CONFIG_PM 322#ifdef CONFIG_PM
323static unsigned long saved_gafr[2][4]; 323static unsigned long saved_gafr[2][4];
324static unsigned long saved_gpdr[4]; 324static unsigned long saved_gpdr[4];
325static unsigned long saved_pgsr[4];
325 326
326static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state) 327static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
327{ 328{
@@ -332,6 +333,7 @@ static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
332 saved_gafr[0][i] = GAFR_L(i); 333 saved_gafr[0][i] = GAFR_L(i);
333 saved_gafr[1][i] = GAFR_U(i); 334 saved_gafr[1][i] = GAFR_U(i);
334 saved_gpdr[i] = GPDR(i * 32); 335 saved_gpdr[i] = GPDR(i * 32);
336 saved_pgsr[i] = PGSR(i);
335 337
336 GPDR(i * 32) = gpdr_lpm[i]; 338 GPDR(i * 32) = gpdr_lpm[i];
337 } 339 }
@@ -346,6 +348,7 @@ static int pxa2xx_mfp_resume(struct sys_device *d)
346 GAFR_L(i) = saved_gafr[0][i]; 348 GAFR_L(i) = saved_gafr[0][i];
347 GAFR_U(i) = saved_gafr[1][i]; 349 GAFR_U(i) = saved_gafr[1][i];
348 GPDR(i * 32) = saved_gpdr[i]; 350 GPDR(i * 32) = saved_gpdr[i];
351 PGSR(i) = saved_pgsr[i];
349 } 352 }
350 PSSR = PSSR_RDH | PSSR_PH; 353 PSSR = PSSR_RDH | PSSR_PH;
351 return 0; 354 return 0;
@@ -374,6 +377,9 @@ static int __init pxa2xx_mfp_init(void)
374 if (cpu_is_pxa27x()) 377 if (cpu_is_pxa27x())
375 pxa27x_mfp_init(); 378 pxa27x_mfp_init();
376 379
380 /* clear RDH bit to enable GPIO receivers after reset/sleep exit */
381 PSSR = PSSR_RDH;
382
377 /* initialize gafr_run[], pgsr_lpm[] from existing values */ 383 /* initialize gafr_run[], pgsr_lpm[] from existing values */
378 for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) 384 for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++)
379 gpdr_lpm[i] = GPDR(i * 32); 385 gpdr_lpm[i] = GPDR(i * 32);