diff options
author | Charulatha V <charu@ti.com> | 2011-09-13 09:02:37 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-10-07 16:37:06 -0400 |
commit | ff2f8e5ffb23de6e2284f31651447cb80a4c9d1b (patch) | |
tree | 64b35ef55b2ad58c4247283ecf264ff3273d64e9 | |
parent | 976d167615b64e14bc1491ca51d424e2ba9a5e84 (diff) |
ARM: OMAP3: PM: fix pwrdm_post_transition call sequence
The context lost count is modified in omap_sram_idle() path when
pwrdm_post_transition() is called. But pwrdm_post_transition() is called
only after omap_gpio_resume_after_idle() is called. Correct this so that
context lost count is modified before calling omap_gpio_resume_after_idle().
This would be useful when OMAP GPIO save/restore context is called by
the OMAP GPIO driver itself.
Signed-off-by: Charulatha V <charu@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 7255d9bce868..1915050e9401 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -363,7 +363,6 @@ void omap_sram_idle(void) | |||
363 | printk(KERN_ERR "Invalid mpu state in sram_idle\n"); | 363 | printk(KERN_ERR "Invalid mpu state in sram_idle\n"); |
364 | return; | 364 | return; |
365 | } | 365 | } |
366 | pwrdm_pre_transition(); | ||
367 | 366 | ||
368 | /* NEON control */ | 367 | /* NEON control */ |
369 | if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON) | 368 | if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON) |
@@ -386,6 +385,8 @@ void omap_sram_idle(void) | |||
386 | if (!console_trylock()) | 385 | if (!console_trylock()) |
387 | goto console_still_active; | 386 | goto console_still_active; |
388 | 387 | ||
388 | pwrdm_pre_transition(); | ||
389 | |||
389 | /* PER */ | 390 | /* PER */ |
390 | if (per_next_state < PWRDM_POWER_ON) { | 391 | if (per_next_state < PWRDM_POWER_ON) { |
391 | per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; | 392 | per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; |
@@ -455,6 +456,8 @@ void omap_sram_idle(void) | |||
455 | } | 456 | } |
456 | omap3_intc_resume_idle(); | 457 | omap3_intc_resume_idle(); |
457 | 458 | ||
459 | pwrdm_post_transition(); | ||
460 | |||
458 | /* PER */ | 461 | /* PER */ |
459 | if (per_next_state < PWRDM_POWER_ON) { | 462 | if (per_next_state < PWRDM_POWER_ON) { |
460 | per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm); | 463 | per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm); |
@@ -478,8 +481,6 @@ console_still_active: | |||
478 | omap3_disable_io_chain(); | 481 | omap3_disable_io_chain(); |
479 | } | 482 | } |
480 | 483 | ||
481 | pwrdm_post_transition(); | ||
482 | |||
483 | clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); | 484 | clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); |
484 | } | 485 | } |
485 | 486 | ||