diff options
author | Dmitry Osipenko <[email protected]> | 2021-03-02 12:54:04 +0300 |
---|---|---|
committer | Daniel Lezcano <[email protected]> | 2021-04-08 19:54:14 +0200 |
commit | 32c8c34d8132b5fe8497c2538597445a0d65c29d (patch) | |
tree | fd47ced9badf522aa3d2c750cd36147e000d7841 | |
parent | e49d033bddf5b565044e2abe4241353959bc9120 (diff) |
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: 14e086baca50 ("cpuidle: tegra: Squash Tegra114 driver into the common driver")
Cc: [email protected] # 5.7+
Reported-by: Anton Bambura <[email protected]> # TF701 T114
Tested-by: Anton Bambura <[email protected]> # TF701 T114
Tested-by: Matt Merhar <[email protected]> # Ouya T30
Tested-by: Peter Geis <[email protected]> # Ouya T30
Signed-off-by: Dmitry Osipenko <[email protected]>
Reviewed-by: Daniel Lezcano <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | drivers/cpuidle/cpuidle-tegra.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c index 191966dc8d02..29c5e83500d3 100644 --- a/drivers/cpuidle/cpuidle-tegra.c +++ b/drivers/cpuidle/cpuidle-tegra.c @@ -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) - return err; + err = call_firmware_op(prepare_idle, TF_PM_MODE_LP2_NOFLUSH_L2); + 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); } |