Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d273f41 authored by Maulik Shah's avatar Maulik Shah
Browse files

cpuidle: lpm-levels: Fix WFI mode to work on Non-PSCI targets



Fix WFI mode to work on Non-PSCI targets. Also skip update
lpm debug events if WFI low power mode is selected.

Change-Id: If07ccddb9642ab62d2fbf936574970a1770afb8e
Signed-off-by: default avatarMaulik Shah <mkshah@codeaurora.org>
parent 84a40fce
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -874,13 +874,17 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
	if (need_resched() || (idx < 0))
		goto exit;

	if (idx > 0 && !use_psci) {
		update_debug_pc_event(CPU_ENTER, idx, 0xdeaffeed, 0xdeaffeed,
					true);
	if (!use_psci) {
		if (idx > 0)
			update_debug_pc_event(CPU_ENTER, idx, 0xdeaffeed,
							0xdeaffeed, true);

		success = msm_cpu_pm_enter_sleep(cluster->cpu->levels[idx].mode,
				true);
		update_debug_pc_event(CPU_EXIT, idx, success, 0xdeaffeed,
					true);

		if (idx > 0)
			update_debug_pc_event(CPU_EXIT, idx, success,
							0xdeaffeed, true);
	} else {
		success = psci_enter_sleep(cluster, idx, true);
	}