[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210120013304.12257-1-digetx@gmail.com>
Date: Wed, 20 Jan 2021 04:33:04 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Peter Geis <pgwipeout@...il.com>,
Matt Merhar <mattmerhar@...tonmail.com>
Cc: linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3] 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")
Cc: stable@...r.kernel.org
Reported-by: Peter Geis <pgwipeout@...il.com>
Tested-by: Peter Geis <pgwipeout@...il.com> # Ouya T30
Tested-by: Matt Merhar <mattmerhar@...tonmail.com> # Ouya T30
Signed-off-by: Dmitry Osipenko <digetx@...il.com>
---
Changelog:
v3: - No code changes. This patch is factored out from [1] to ease the
applying, since it doesn't have any dependencies on other patches
and fixes a standalone problem.
[1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=221130
drivers/soc/tegra/regulators-tegra30.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/tegra/regulators-tegra30.c b/drivers/soc/tegra/regulators-tegra30.c
index 7f21f31de09d..0e776b20f625 100644
--- a/drivers/soc/tegra/regulators-tegra30.c
+++ b/drivers/soc/tegra/regulators-tegra30.c
@@ -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
--
2.29.2
Powered by blists - more mailing lists