summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2026-08-21 14:01:24 +0100
committerThierry Reding <treding@nvidia.com>2026-09-10 14:40:22 +0200
commitc5c95dbdc9011a56359df4dc00be829bbcc0b036 (patch)
tree5c4b37b35a519027fb58ba151e2348d531c3a742
parent2f4a0fb66d313f03832f061bc3ec25b33c8198c9 (diff)
downloadlinux-next-c5c95dbdc9011a56359df4dc00be829bbcc0b036.tar.gz
linux-next-c5c95dbdc9011a56359df4dc00be829bbcc0b036.zip
soc/tegra: pmc: Fix uninitialised clock rate
For legacy 32-bit Tegra devices, the warning in the tegra_pmc_enter_suspend_mode() function is being triggered because the early_pmc->rate variable is never configured and hence, always 0. This issue started occurring after updating the PMC driver to create the PMC context dynamically which causes the 'rate' to be set in the new dynamic context, but missed updating the rate in the early PMC context. Fix this by initialising the early_pmc->rate variable for 32-bit Tegra devices when the rate for the PMC context is initialised. Fixes: 4d61f0342689 ("soc/tegra: pmc: Create PMC context dynamically") Signed-off-by: Jon Hunter <jonathanh@nvidia.com> [treding@nvidia.com: move assignment to existing #ifdef block] Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/soc/tegra/pmc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 41ed716d5857..ea4dfe1994bd 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -3151,6 +3151,7 @@ static int tegra_pmc_probe(struct platform_device *pdev)
#if defined(CONFIG_ARM)
mutex_lock(&early_pmc->powergates_lock);
+ early_pmc->rate = pmc->rate;
iounmap(early_pmc->base);
early_pmc->base = pmc->base;
mutex_unlock(&early_pmc->powergates_lock);