From a16c958147fa7b439e475a3e87029e027c5c9324 Mon Sep 17 00:00:00 2001 From: Abel Vesa Date: Thu, 24 Sep 2026 15:06:53 +0300 Subject: [PATCH] clk: qcom: gpucc-x1e80100: 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 Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260924-clk-qcom-rework-legacy-always-on-clocks-v2-41-1479443ee016@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- drivers/clk/qcom/gpucc-x1e80100.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/gpucc-x1e80100.c b/drivers/clk/qcom/gpucc-x1e80100.c index f9161dbaedd7..10a0b11927e3 100644 --- a/drivers/clk/qcom/gpucc-x1e80100.c +++ b/drivers/clk/qcom/gpucc-x1e80100.c @@ -609,7 +609,17 @@ static const struct regmap_config gpu_cc_x1e80100_regmap_config = { .fast_io = true, }; +static const u32 gpu_cc_x1e80100_critical_cbcrs[] = { + 0x93a4, /* GPU_CC_CB_CLK */ +}; + +static const struct qcom_cc_driver_data gpu_cc_x1e80100_driver_data = { + .clk_cbcrs = gpu_cc_x1e80100_critical_cbcrs, + .num_clk_cbcrs = ARRAY_SIZE(gpu_cc_x1e80100_critical_cbcrs), +}; + static const struct qcom_cc_desc gpu_cc_x1e80100_desc = { + .driver_data = &gpu_cc_x1e80100_driver_data, .config = &gpu_cc_x1e80100_regmap_config, .clks = gpu_cc_x1e80100_clocks, .num_clks = ARRAY_SIZE(gpu_cc_x1e80100_clocks), @@ -636,9 +646,6 @@ static int gpu_cc_x1e80100_probe(struct platform_device *pdev) clk_zonda_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config); clk_lucid_evo_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config); - /* Keep clocks always enabled */ - qcom_branch_set_clk_en(regmap, 0x93a4); /* GPU_CC_CB_CLK */ - return qcom_cc_really_probe(&pdev->dev, &gpu_cc_x1e80100_desc, regmap); }