msm: pm-8x60: Fix bug where device enter low power mode
An incorrect ordering in the check of allowed modes, results in standalone power collapse not getting selected when the secondary cores are online. Change-Id: Idc7177b78bd0ce7563cc27afbf6c12d3bc1f9f9a Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
ede381c934
commit
25f378cfbd
@@ -791,6 +791,7 @@ int msm_pm_idle_prepare(struct cpuidle_device *dev,
|
||||
|
||||
switch (mode) {
|
||||
case MSM_PM_SLEEP_MODE_POWER_COLLAPSE:
|
||||
case MSM_PM_SLEEP_MODE_RETENTION:
|
||||
if (!allow)
|
||||
break;
|
||||
|
||||
@@ -810,15 +811,6 @@ int msm_pm_idle_prepare(struct cpuidle_device *dev,
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case MSM_PM_SLEEP_MODE_RETENTION:
|
||||
if (!allow)
|
||||
break;
|
||||
if (num_online_cpus() > 1) {
|
||||
allow = false;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT:
|
||||
if (!allow)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user