diff options
author | Sanjeev Premi <premi@ti.com> | 2010-01-28 12:46:43 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-02-23 14:05:00 -0500 |
commit | 6af83b38613da58a221e56af676097575ce2c763 (patch) | |
tree | da9cbc660ff2c7267782c57bf1cf5e655bf1983c /arch/arm/mach-omap2/pm34xx.c | |
parent | 80c20d543d142ee54ec85259b77aaf0b83c32db5 (diff) |
OMAP3: cpuidle: Update statistics for correct state
When 'enable_off_mode' is 0, the target power state for MPU
and CORE was locally changed to PWRDM_POWER_RET but, the
statistics are updated for idle state originally selected
by the governor.
This patch 'invalidates' the idle states that lead either of
MPU or Core to PWRDM_POWER_OFF state when 'enable_off_mode'
is '0'. The states are valid once 'enable_off_mode' is set
to '1'.
Added function next_valid_state() to check if current state
is valid; else get the next valid state. It is called from
omap3_enter_idle_bm().
Signed-off-by: Sanjeev Premi <premi@ti.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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 5087b153b093..5320229926e4 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -941,6 +941,10 @@ void omap3_pm_off_mode_enable(int enable) | |||
941 | else | 941 | else |
942 | state = PWRDM_POWER_RET; | 942 | state = PWRDM_POWER_RET; |
943 | 943 | ||
944 | #ifdef CONFIG_CPU_IDLE | ||
945 | omap3_cpuidle_update_states(); | ||
946 | #endif | ||
947 | |||
944 | list_for_each_entry(pwrst, &pwrst_list, node) { | 948 | list_for_each_entry(pwrst, &pwrst_list, node) { |
945 | pwrst->next_state = state; | 949 | pwrst->next_state = state; |
946 | set_pwrdm_state(pwrst->pwrdm, state); | 950 | set_pwrdm_state(pwrst->pwrdm, state); |