Commit 32c8c34d authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Daniel Lezcano
Browse files

cpuidle: tegra: Fix C7 idling state on Tegra114



Trusted Foundation firmware doesn't implement the do_idle call and in
this case suspending should fall back to the common suspend path. In order
to fix this issue we will unconditionally set the NOFLUSH_L2 mode via
firmware call, which is a NO-OP on Tegra30/124, and then proceed to the
C7 idling, like it was done by the older Tegra114 cpuidle driver.

Fixes: 14e086ba ("cpuidle: tegra: Squash Tegra114 driver into the common driver")
Cc: stable@vger.kernel.org # 5.7+
Reported-by: Anton Bambura <jenneron@protonmail.com> # TF701 T114
Tested-by: Anton Bambura <jenneron@protonmail.com> # TF701 T114
Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30
Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Reviewed-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210302095405.28453-1-digetx@gmail.com
parent e49d033b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -135,13 +135,13 @@ static int tegra_cpuidle_c7_enter(void)
{
	int err;

	if (tegra_cpuidle_using_firmware()) {
	err = call_firmware_op(prepare_idle, TF_PM_MODE_LP2_NOFLUSH_L2);
		if (err)
	if (err && err != -ENOSYS)
		return err;

		return call_firmware_op(do_idle, 0);
	}
	err = call_firmware_op(do_idle, 0);
	if (err != -ENOSYS)
		return err;

	return cpu_suspend(0, tegra30_pm_secondary_cpu_suspend);
}