aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm34xx.c
diff options
context:
space:
mode:
authorTero Kristo <tero.kristo@nokia.com>2008-12-22 07:27:12 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-12 12:39:16 -0400
commita118b5f3391fc60e1619a79f8ceb070bb7b39b2d (patch)
treed8c7b3aadf2e6b92cabd3651f181b2196a76669e /arch/arm/mach-omap2/pm34xx.c
parentb57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff)
OMAP3: GPIO fixes for off-mode
Off mode is now using the omap2 retention fix code for scanning GPIOs during off-mode transitions. All the *non_wakeup_gpios variables are now used for off-mode transition tracking on OMAP3. This patch fixes cases where GPIO state changes are missed during off-mode. Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r--arch/arm/mach-omap2/pm34xx.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index ea0000bc5358..5de07db636bd 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -376,14 +376,15 @@ void omap_sram_idle(void)
376 core_next_state = pwrdm_read_next_pwrst(core_pwrdm); 376 core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
377 if (per_next_state < PWRDM_POWER_ON) { 377 if (per_next_state < PWRDM_POWER_ON) {
378 omap_uart_prepare_idle(2); 378 omap_uart_prepare_idle(2);
379 omap2_gpio_prepare_for_retention();
380 if (per_next_state == PWRDM_POWER_OFF) { 379 if (per_next_state == PWRDM_POWER_OFF) {
381 if (core_next_state == PWRDM_POWER_ON) { 380 if (core_next_state == PWRDM_POWER_ON) {
382 per_next_state = PWRDM_POWER_RET; 381 per_next_state = PWRDM_POWER_RET;
383 pwrdm_set_next_pwrst(per_pwrdm, per_next_state); 382 pwrdm_set_next_pwrst(per_pwrdm, per_next_state);
384 per_state_modified = 1; 383 per_state_modified = 1;
385 } else 384 } else {
385 omap2_gpio_prepare_for_retention();
386 omap3_per_save_context(); 386 omap3_per_save_context();
387 }
387 } 388 }
388 } 389 }
389 390
@@ -454,9 +455,10 @@ void omap_sram_idle(void)
454 /* PER */ 455 /* PER */
455 if (per_next_state < PWRDM_POWER_ON) { 456 if (per_next_state < PWRDM_POWER_ON) {
456 per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm); 457 per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm);
457 if (per_prev_state == PWRDM_POWER_OFF) 458 if (per_prev_state == PWRDM_POWER_OFF) {
458 omap3_per_restore_context(); 459 omap3_per_restore_context();
459 omap2_gpio_resume_after_retention(); 460 omap2_gpio_resume_after_retention();
461 }
460 omap_uart_resume_idle(2); 462 omap_uart_resume_idle(2);
461 if (per_state_modified) 463 if (per_state_modified)
462 pwrdm_set_next_pwrst(per_pwrdm, PWRDM_POWER_OFF); 464 pwrdm_set_next_pwrst(per_pwrdm, PWRDM_POWER_OFF);