[PATCH 36/48] clk: qcom: gpucc-sar2130p: Use common probe handling for always-on clocks
From: Abel Vesa
Date: Wed Sep 16 2026 - 06:59:37 EST
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
Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>
---
drivers/clk/qcom/gpucc-sar2130p.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/qcom/gpucc-sar2130p.c b/drivers/clk/qcom/gpucc-sar2130p.c
index dd72b2a48c42..fa261664c1bf 100644
--- a/drivers/clk/qcom/gpucc-sar2130p.c
+++ b/drivers/clk/qcom/gpucc-sar2130p.c
@@ -455,7 +455,17 @@ static const struct regmap_config gpu_cc_sar2130p_regmap_config = {
.fast_io = true,
};
+static const u32 gpu_cc_sar2130p_critical_cbcrs[] = {
+ 0x900c, /* GPU_CC_DEMET_CLK */
+};
+
+static const struct qcom_cc_driver_data gpu_cc_sar2130p_driver_data = {
+ .clk_cbcrs = gpu_cc_sar2130p_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(gpu_cc_sar2130p_critical_cbcrs),
+};
+
static const struct qcom_cc_desc gpu_cc_sar2130p_desc = {
+ .driver_data = &gpu_cc_sar2130p_driver_data,
.config = &gpu_cc_sar2130p_regmap_config,
.clks = gpu_cc_sar2130p_clocks,
.num_clks = ARRAY_SIZE(gpu_cc_sar2130p_clocks),
@@ -483,9 +493,6 @@ static int gpu_cc_sar2130p_probe(struct platform_device *pdev)
clk_lucid_ole_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config);
clk_lucid_ole_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x900c); /* GPU_CC_DEMET_CLK */
-
return qcom_cc_really_probe(dev, &gpu_cc_sar2130p_desc, regmap);
}
--
2.54.0