summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAbel Vesa <abel.vesa@oss.qualcomm.com>2026-09-24 15:06:58 +0300
committerBjorn Andersson <andersson@kernel.org>2026-10-13 09:49:43 -0500
commit7cd427f13a099f35ff96cd00f0ebabbf8e7eee7e (patch)
tree84171674fd1132f918def8225e6b5645daa58d98 /drivers
parent3afa984ab129d110f4daa3884c54a354b89a28aa (diff)
downloadlinux-next-7cd427f13a099f35ff96cd00f0ebabbf8e7eee7e.tar.gz
linux-next-7cd427f13a099f35ff96cd00f0ebabbf8e7eee7e.zip
clk: qcom: videocc-sm7150: Use common probe handling for always-on clocks
Describe the always-on branches in a critical_cbcrs array and reference it through qcom_cc_driver_data. Let qcom_cc_really_probe() enable these branches instead of programming them directly in the driver's probe. Assisted-by: LLM Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Link: https://patch.msgid.link/20260924-clk-qcom-rework-legacy-always-on-clocks-v2-46-1479443ee016@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/qcom/videocc-sm7150.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/clk/qcom/videocc-sm7150.c b/drivers/clk/qcom/videocc-sm7150.c
index 8d2e00799f96..32bad5e09056 100644
--- a/drivers/clk/qcom/videocc-sm7150.c
+++ b/drivers/clk/qcom/videocc-sm7150.c
@@ -313,7 +313,17 @@ static const struct regmap_config videocc_sm7150_regmap_config = {
.fast_io = true,
};
+static const u32 videocc_sm7150_critical_cbcrs[] = {
+ 0x984, /* VIDEOCC_XO_CLK */
+};
+
+static const struct qcom_cc_driver_data videocc_sm7150_driver_data = {
+ .clk_cbcrs = videocc_sm7150_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(videocc_sm7150_critical_cbcrs),
+};
+
static const struct qcom_cc_desc videocc_sm7150_desc = {
+ .driver_data = &videocc_sm7150_driver_data,
.config = &videocc_sm7150_regmap_config,
.clks = videocc_sm7150_clocks,
.num_clks = ARRAY_SIZE(videocc_sm7150_clocks),
@@ -337,9 +347,6 @@ static int videocc_sm7150_probe(struct platform_device *pdev)
clk_fabia_pll_configure(&videocc_pll0, regmap, &videocc_pll0_config);
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x984); /* VIDEOCC_XO_CLK */
-
return qcom_cc_really_probe(&pdev->dev, &videocc_sm7150_desc, regmap);
}