aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm34xx.c
diff options
context:
space:
mode:
authorMike Chan <mike@android.com>2010-05-03 19:04:06 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-12 12:39:00 -0400
commit40742fa82ebf53c9367f5807cf1012d518516e74 (patch)
tree3d41d77a1417d3ffe0f065479e7da3d67ad755e0 /arch/arm/mach-omap2/pm34xx.c
parent7a44ad2fce65ed2811ebef4adbc38bcc82cd44a7 (diff)
OMAP3: PM: Enable IO / IO-CHAIN wakeups for PER
IO events can also come from GPIO modules, which reside in the PER domain. It is possible for the PER to enter RET while CORE is still in ON. If GPIO 2-6 are enabled for IO-pad wakeups, the PER domain will not wakeup in this case, unless we enable it. Signed-off-by: Mike Chan <mike@android.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.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index e76af5b532a0..eec0916de819 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -379,9 +379,16 @@ void omap_sram_idle(void)
379 if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON) 379 if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON)
380 pwrdm_set_next_pwrst(neon_pwrdm, mpu_next_state); 380 pwrdm_set_next_pwrst(neon_pwrdm, mpu_next_state);
381 381
382 /* PER */ 382 /* Enable IO-PAD and IO-CHAIN wakeups */
383 per_next_state = pwrdm_read_next_pwrst(per_pwrdm); 383 per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
384 core_next_state = pwrdm_read_next_pwrst(core_pwrdm); 384 core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
385 if (per_next_state < PWRDM_POWER_ON ||
386 core_next_state < PWRDM_POWER_ON) {
387 prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
388 omap3_enable_io_chain();
389 }
390
391 /* PER */
385 if (per_next_state < PWRDM_POWER_ON) { 392 if (per_next_state < PWRDM_POWER_ON) {
386 omap_uart_prepare_idle(2); 393 omap_uart_prepare_idle(2);
387 omap2_gpio_prepare_for_retention(); 394 omap2_gpio_prepare_for_retention();
@@ -406,10 +413,8 @@ void omap_sram_idle(void)
406 omap3_core_save_context(); 413 omap3_core_save_context();
407 omap3_prcm_save_context(); 414 omap3_prcm_save_context();
408 } 415 }
409 /* Enable IO-PAD and IO-CHAIN wakeups */
410 prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
411 omap3_enable_io_chain();
412 } 416 }
417
413 omap3_intc_prepare_idle(); 418 omap3_intc_prepare_idle();
414 419
415 /* 420 /*
@@ -471,7 +476,8 @@ void omap_sram_idle(void)
471 } 476 }
472 477
473 /* Disable IO-PAD and IO-CHAIN wakeup */ 478 /* Disable IO-PAD and IO-CHAIN wakeup */
474 if (core_next_state < PWRDM_POWER_ON) { 479 if (per_next_state < PWRDM_POWER_ON ||
480 core_next_state < PWRDM_POWER_ON) {
475 prm_clear_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); 481 prm_clear_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
476 omap3_disable_io_chain(); 482 omap3_disable_io_chain();
477 } 483 }