[PATCH 5/5] clk: tegra: bpmp: Do not cache the EMC clock rate

From: Johnny Liu

Date: Wed Oct 28 2026 - 04:52:30 EST


EMC clock scaling is managed by the BPMP itself without kernel
involvement. When the rate changes on the BPMP side, clk_get_rate() on
the kernel side returns the stale value cached by the common clock
framework instead of the rate programmed by the BPMP.

Set CLK_GET_RATE_NOCACHE on the EMC clock, identified by the per-SoC
emc_clk_id from the BPMP SoC data, so that rate queries are forwarded to
the BPMP.

Signed-off-by: Johnny Liu <johnliu@xxxxxxxxxx>
---
drivers/clk/tegra/clk-bpmp.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c
index 067a8555c4e7..ddbc528cf93a 100644
--- a/drivers/clk/tegra/clk-bpmp.c
+++ b/drivers/clk/tegra/clk-bpmp.c
@@ -588,6 +588,9 @@ tegra_bpmp_clk_register(struct tegra_bpmp *bpmp,

init.parent_names = parents;

+ if (bpmp->soc->emc_clk_id && info->id == bpmp->soc->emc_clk_id)
+ init.flags = CLK_GET_RATE_NOCACHE;
+
err = devm_clk_hw_register(bpmp->dev, &clk->hw);

kfree(parents);
--
2.43.0