提交 ff2f8e5f 编写于 作者: C Charulatha V 提交者: Kevin Hilman

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: NCharulatha V <charu@ti.com>
Reviewed-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NKevin Hilman <khilman@ti.com>
上级 976d1676
...@@ -363,7 +363,6 @@ void omap_sram_idle(void) ...@@ -363,7 +363,6 @@ void omap_sram_idle(void)
printk(KERN_ERR "Invalid mpu state in sram_idle\n"); printk(KERN_ERR "Invalid mpu state in sram_idle\n");
return; return;
} }
pwrdm_pre_transition();
/* NEON control */ /* NEON control */
if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON) if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON)
...@@ -386,6 +385,8 @@ void omap_sram_idle(void) ...@@ -386,6 +385,8 @@ void omap_sram_idle(void)
if (!console_trylock()) if (!console_trylock())
goto console_still_active; goto console_still_active;
pwrdm_pre_transition();
/* PER */ /* PER */
if (per_next_state < PWRDM_POWER_ON) { if (per_next_state < PWRDM_POWER_ON) {
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;
...@@ -455,6 +456,8 @@ void omap_sram_idle(void) ...@@ -455,6 +456,8 @@ void omap_sram_idle(void)
} }
omap3_intc_resume_idle(); omap3_intc_resume_idle();
pwrdm_post_transition();
/* PER */ /* PER */
if (per_next_state < PWRDM_POWER_ON) { if (per_next_state < PWRDM_POWER_ON) {
per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm); per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm);
...@@ -478,8 +481,6 @@ void omap_sram_idle(void) ...@@ -478,8 +481,6 @@ void omap_sram_idle(void)
omap3_disable_io_chain(); omap3_disable_io_chain();
} }
pwrdm_post_transition();
clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册