All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: pmc: Fix uninitialised clock rate
@ 2026-08-21 13:01 Jon Hunter
  2026-09-10 12:41 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Hunter @ 2026-08-21 13:01 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter; +Cc: linux-tegra

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>
---
 drivers/soc/tegra/pmc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 41ed716d5857..6d7ac2b8c74e 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -3121,6 +3121,9 @@ static int tegra_pmc_probe(struct platform_device *pdev)
 		}
 
 		pmc->rate = clk_get_rate(pmc->clk);
+#if defined(CONFIG_ARM)
+		early_pmc->rate = pmc->rate;
+#endif
 	}
 
 	err = tegra_pmc_init(pmc);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] soc/tegra: pmc: Fix uninitialised clock rate
  2026-08-21 13:01 [PATCH] soc/tegra: pmc: Fix uninitialised clock rate Jon Hunter
@ 2026-09-10 12:41 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2026-09-10 12:41 UTC (permalink / raw)
  To: Thierry Reding, Jon Hunter; +Cc: linux-tegra

From: Thierry Reding <treding@nvidia.com>


On Fri, 21 Aug 2026 14:01:24 +0100, Jon Hunter wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] soc/tegra: pmc: Fix uninitialised clock rate
      commit: c5c95dbdc9011a56359df4dc00be829bbcc0b036

Best regards,
-- 
Thierry Reding <treding@nvidia.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-10 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 13:01 [PATCH] soc/tegra: pmc: Fix uninitialised clock rate Jon Hunter
2026-09-10 12:41 ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.