Skip to content

Commit

Permalink
soc/tegra: regulators: Fix locking up when voltage-spread is out of r…
Browse files Browse the repository at this point in the history
…ange

Fix voltage coupler lockup which happens when voltage-spread is out
of range due to a bug in the code. The max-spread requirement shall be
accounted when CPU regulator doesn't have consumers. This problem is
observed on Tegra30 Ouya game console once system-wide DVFS is enabled
in a device-tree.

Fixes: 7838074 ("soc/tegra: regulators: Add regulators coupler for Tegra30")
Cc: stable@vger.kernel.org
Reported-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30
Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
  • Loading branch information
Dmitry Osipenko authored and Thierry Reding committed Mar 26, 2021
1 parent 9d5e7c3 commit ef85bb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/soc/tegra/regulators-tegra30.c
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra,
* survive the voltage drop if it's running on a higher frequency.
*/
if (!cpu_min_uV_consumers)
cpu_min_uV = cpu_uV;
cpu_min_uV = max(cpu_uV, cpu_min_uV);

/*
* Bootloader shall set up voltages correctly, but if it

0 comments on commit ef85bb5

Please sign in to comment.