diff options
author | Benn Pörscke <benn.porscke@stericsson.com> | 2011-12-16 15:04:55 +0100 |
---|---|---|
committer | Benn Pörscke <benn.porscke@stericsson.com> | 2011-12-16 15:04:55 +0100 |
commit | 93f379e6cfadfded0d262192ca69d1abc096d90e (patch) | |
tree | 43f180e31ee26ee94f7d2dd559132c30c6476b4d /drivers/cpuidle/cpuidle-dbx500.c | |
parent | 77955e37bd395f789900b8e180991ad67cabd899 (diff) |
Squashandroid-20111223
Change-Id: I2fcf46d1fc4b0cd4c61e5be3654c43b80db86015
Diffstat (limited to 'drivers/cpuidle/cpuidle-dbx500.c')
-rw-r--r-- | drivers/cpuidle/cpuidle-dbx500.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/cpuidle/cpuidle-dbx500.c b/drivers/cpuidle/cpuidle-dbx500.c index 59f74a1b98f..aeb56f97611 100644 --- a/drivers/cpuidle/cpuidle-dbx500.c +++ b/drivers/cpuidle/cpuidle-dbx500.c @@ -288,7 +288,7 @@ static int determine_sleep_state(u32 *sleep_time) int cpu; int max_depth; - bool power_state_req; + bool uart, modem, ape; /* If first cpu to sleep, go to most shallow sleep state */ if (!is_last_cpu_running()) @@ -306,8 +306,6 @@ static int determine_sleep_state(u32 *sleep_time) return CI_WFI; } - power_state_req = power_state_active_is_enabled() || - prcmu_is_ac_wake_requested(); (*sleep_time) = get_remaining_sleep_time(NULL, NULL); @@ -324,6 +322,10 @@ static int determine_sleep_state(u32 *sleep_time) max_depth = per_cpu(cpu_state, cpu)->gov_cstate; } + uart = ux500_ci_dbg_force_ape_on(); + ape = power_state_active_is_enabled(); + modem = prcmu_is_ac_wake_requested(); + for (i = max_depth; i > 0; i--) { if ((*sleep_time) <= cstates[i].threshold) @@ -331,8 +333,7 @@ static int determine_sleep_state(u32 *sleep_time) if (cstates[i].APE == APE_OFF) { /* This state says APE should be off */ - if (power_state_req || - ux500_ci_dbg_force_ape_on()) + if (ape || modem || uart) continue; } @@ -340,7 +341,7 @@ static int determine_sleep_state(u32 *sleep_time) break; } - ux500_ci_dbg_register_reason(i, power_state_req, + ux500_ci_dbg_register_reason(i, ape, modem, uart, (*sleep_time), max_depth); return max(CI_WFI, i); |