soc/tegra: pmc: Fix uninitialised clock rate
Jon Hunter
maintainerPATCH 1/1 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.
--- drivers/soc/tegra/pmc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/soc/tegra/pmc.c +3 -0
@@ -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);
Signature · 1 line
2.43.0
From: Thierry Reding <[email protected]>
Quoted 8 lines · Jon Hunter
For legacy 32-bit Tegra devices, the warning in the
tegra_pmc_enter_suspend_mode()function is being triggered because theearly_pmc->ratevariable 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,
Signature · 1 line
Thierry Reding <[email protected]>