summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm34xx.c
diff options
context:
space:
mode:
authorTero Kristo <tero.kristo@nokia.com>2008-12-22 14:27:12 +0200
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-12 09:39:16 -0700
commita118b5f3391fc60e1619a79f8ceb070bb7b39b2d (patch)
treed8c7b3aadf2e6b92cabd3651f181b2196a76669e /arch/arm/mach-omap2/pm34xx.c
parentb57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff)
downloadop-kernel-dev-a118b5f3391fc60e1619a79f8ceb070bb7b39b2d.zip
op-kernel-dev-a118b5f3391fc60e1619a79f8ceb070bb7b39b2d.tar.gz
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 ea0000b..5de07db 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -376,14 +376,15 @@ void omap_sram_idle(void)
core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
if (per_next_state < PWRDM_POWER_ON) {
omap_uart_prepare_idle(2);
- omap2_gpio_prepare_for_retention();
if (per_next_state == PWRDM_POWER_OFF) {
if (core_next_state == PWRDM_POWER_ON) {
per_next_state = PWRDM_POWER_RET;
pwrdm_set_next_pwrst(per_pwrdm, per_next_state);
per_state_modified = 1;
- } else
+ } else {
+ omap2_gpio_prepare_for_retention();
omap3_per_save_context();
+ }
}
}
@@ -454,9 +455,10 @@ void omap_sram_idle(void)
/* PER */
if (per_next_state < PWRDM_POWER_ON) {
per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm);
- if (per_prev_state == PWRDM_POWER_OFF)
+ if (per_prev_state == PWRDM_POWER_OFF) {
omap3_per_restore_context();
- omap2_gpio_resume_after_retention();
+ omap2_gpio_resume_after_retention();
+ }
omap_uart_resume_idle(2);
if (per_state_modified)
pwrdm_set_next_pwrst(per_pwrdm, PWRDM_POWER_OFF);
OpenPOWER on IntegriCloud