Skip to contentSkip to conversation

soc/tegra: regulators: Fix locking up when voltage-spread is out of range

PATCH Applied Dmitry Osipenko 2 participants 2 messages Mar 2, 2021 – Mar 25, 2021 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc/tegra: regulators: Fix locking up when voltage-spread is out of range

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 783807436f36 ("soc/tegra: regulators: Add regulators coupler for Tegra30")
---
 drivers/soc/tegra/regulators-tegra30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/tegra/regulators-tegra30.c +1 -1
index 7f21f31de09d..0e776b20f625 100644
@@ -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
Signature · 1 line
2.29.2
#1 lore raw
Quoted 12 lines · Dmitry Osipenko

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 783807436f36 ("soc/tegra: regulators: Add regulators coupler for Tegra30")
Quoted 3 lines
---
 drivers/soc/tegra/regulators-tegra30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry