From: Johnny Liu <johnliu@nvidia.com>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
"Prashant Gaikwad" <pgaikwad@nvidia.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
"Douglas Anderson" <dianders@chromium.org>,
Aniruddha Rao <anrao@nvidia.com>, <devicetree@vger.kernel.org>,
<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-clk@vger.kernel.org>
Cc: Johnny Liu <johnliu@nvidia.com>
Subject: [PATCH v3 4/4] clk: tegra: bpmp: Do not cache the EMC clock rate
Date: Mon, 2 Nov 2026 12:12:02 +0000 [thread overview]
Message-ID: <20261102121202.2431928-5-johnliu@nvidia.com> (raw)
In-Reply-To: <20261102121202.2431928-1-johnliu@nvidia.com>
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@nvidia.com>
---
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
next prev parent reply other threads:[~2026-11-02 12:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 12:11 [PATCH v3 0/4] Add Tegra238 BPMP support and fix stale EMC clock rate Johnny Liu
2026-11-02 12:11 ` [PATCH v3 1/4] dt-bindings: firmware: tegra186-bpmp: Add Tegra238 BPMP Johnny Liu
2026-11-02 13:12 ` Johnny Liu
2026-11-02 12:12 ` [PATCH v3 2/4] firmware: tegra: bpmp: Add per-SoC EMC clock ID Johnny Liu
2026-11-02 12:12 ` [PATCH v3 3/4] firmware: tegra: bpmp: Add Tegra238 support Johnny Liu
2026-11-02 12:12 ` Johnny Liu [this message]
2026-11-12 11:59 ` [PATCH v3 4/4] clk: tegra: bpmp: Do not cache the EMC clock rate Brian Masney
2026-11-03 6:25 ` [PATCH v3 0/4] Add Tegra238 BPMP support and fix stale " Mikko Perttunen
2026-11-12 1:20 ` Johnny Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102121202.2431928-5-johnliu@nvidia.com \
--to=johnliu@nvidia.com \
--cc=anrao@nvidia.com \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=jbrunet+clk@baylibre.com \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pgaikwad@nvidia.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=thierry.reding@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.