[PATCH] clk: qcom: smd-rpm: Skip proxy votes on clocks for QCM2290

From: Imran Shaik

Date: Thu Sep 10 2026 - 09:55:49 EST


clk_smd_rpm_handoff() votes both active and sleep RPM resource states for
every clock, keeping them non-zero until a consumer takes over. If there
is no consumer, those clocks will remain active in the idle scenario as
well, and the sleep vote is never cleared, blocking XO shutdown.

Introduce the skip_clks_handoff flag to handle this on QCM2290 clocks,
keeping other targets unaffected.

Fixes: 00f64b58874e ("clk: qcom: Add support for SMD-RPM Clocks")
Signed-off-by: Imran Shaik <imran.shaik@xxxxxxxxxxxxxxxx>
---
This patch is dependent on [1], as crypto driver earlier was surviving on
the proxy votes on Qualcomm Shikra SoC and dropping the proxy votes will
impact the bootup. Now patch series [1] takes care of the resource
voting from the crypto driver side.

[1] https://lore.kernel.org/linux-arm-msm/20260907-b4-shikra_crypto_changse-v6-0-0676f61894b3@xxxxxxxxxxxxxxxx/
---
drivers/clk/qcom/clk-smd-rpm.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
index 487d715ed5d2..b78c8cc730b5 100644
--- a/drivers/clk/qcom/clk-smd-rpm.c
+++ b/drivers/clk/qcom/clk-smd-rpm.c
@@ -183,6 +183,7 @@ struct rpm_smd_clk_desc {
const struct clk_smd_rpm ** const icc_clks;
size_t num_icc_clks;
bool scaling_before_handover;
+ bool skip_clks_handoff;
};

static DEFINE_MUTEX(rpm_smd_clk_lock);
@@ -1280,7 +1281,8 @@ static const struct rpm_smd_clk_desc rpm_clk_qcm2290 = {
.clks = qcm2290_clks,
.num_clks = ARRAY_SIZE(qcm2290_clks),
.icc_clks = qcm2290_icc_clks,
- .num_icc_clks = ARRAY_SIZE(qcm2290_icc_clks)
+ .num_icc_clks = ARRAY_SIZE(qcm2290_icc_clks),
+ .skip_clks_handoff = true,
};

static const struct of_device_id rpm_smd_clk_match_table[] = {
@@ -1358,13 +1360,15 @@ static int rpm_smd_clk_probe(struct platform_device *pdev)
goto err;
}

- for (i = 0; i < num_clks; i++) {
- if (!rpm_smd_clks[i])
- continue;
+ if (!desc->skip_clks_handoff) {
+ for (i = 0; i < num_clks; i++) {
+ if (!rpm_smd_clks[i])
+ continue;

- ret = clk_smd_rpm_handoff(rpm_smd_clks[i]);
- if (ret)
- goto err;
+ ret = clk_smd_rpm_handoff(rpm_smd_clks[i]);
+ if (ret)
+ goto err;
+ }
}

for (i = 0; i < desc->num_icc_clks; i++) {

---
base-commit: c68a982815dcce5464e3bf2a31ac94f5146c04ca
change-id: 20260909-clk-smd-rpm-skip-proxy-7725549ea74d
prerequisite-change-id: 20260701-b4-shikra_crypto_changse-f2d6d5bf04b5:v6
prerequisite-patch-id: e24447d3ab70f48b099251c3d6c1307e0aee9d2c
prerequisite-patch-id: 64e9302a1de7a654ffa65af12daff3866531a00c

Best regards,
--
Imran Shaik <imran.shaik@xxxxxxxxxxxxxxxx>