[PATCH v2 2/3] clk: qcom: dispcc-sm8450: Migrate to qcom_cc_driver_data

From: Esteban Urrutia via B4 Relay

Date: Sat Jul 11 2026 - 23:12:07 EST


From: Esteban Urrutia <esteuwu@xxxxxxxxx>

Migrate to qcom_cc_driver_data, which is used by other clock controller
drivers.

Signed-off-by: Esteban Urrutia <esteuwu@xxxxxxxxx>
---
drivers/clk/qcom/dispcc-sm8450.c | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-sm8450.c b/drivers/clk/qcom/dispcc-sm8450.c
index c7e04bd315d5..07f22b5b5ee5 100644
--- a/drivers/clk/qcom/dispcc-sm8450.c
+++ b/drivers/clk/qcom/dispcc-sm8450.c
@@ -1778,6 +1778,22 @@ static const struct regmap_config disp_cc_sm8450_regmap_config = {
.fast_io = true,
};

+static struct clk_alpha_pll *disp_cc_sm8450_plls[] = {
+ &disp_cc_pll0,
+ &disp_cc_pll1,
+};
+
+static const u32 disp_cc_sm8450_critical_cbcrs[] = {
+ 0xe05c, /* DISP_CC_XO_CLK */
+};
+
+static const struct qcom_cc_driver_data disp_cc_sm8450_driver_data = {
+ .alpha_plls = disp_cc_sm8450_plls,
+ .num_alpha_plls = ARRAY_SIZE(disp_cc_sm8450_plls),
+ .clk_cbcrs = disp_cc_sm8450_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(disp_cc_sm8450_critical_cbcrs),
+};
+
static const struct qcom_cc_desc disp_cc_sm8450_desc = {
.config = &disp_cc_sm8450_regmap_config,
.clks = disp_cc_sm8450_clocks,
@@ -1786,6 +1802,7 @@ static const struct qcom_cc_desc disp_cc_sm8450_desc = {
.num_resets = ARRAY_SIZE(disp_cc_sm8450_resets),
.gdscs = disp_cc_sm8450_gdscs,
.num_gdscs = ARRAY_SIZE(disp_cc_sm8450_gdscs),
+ .driver_data = &disp_cc_sm8450_driver_data,
};

static const struct of_device_id disp_cc_sm8450_match_table[] = {
@@ -1823,19 +1840,16 @@ static int disp_cc_sm8450_probe(struct platform_device *pdev)
disp_cc_pll1.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE];
disp_cc_pll1.clkr.hw.init = &sm8475_disp_cc_pll1_init;

- clk_lucid_ole_pll_configure(&disp_cc_pll0, regmap, &sm8475_disp_cc_pll0_config);
- clk_lucid_ole_pll_configure(&disp_cc_pll1, regmap, &sm8475_disp_cc_pll1_config);
+ disp_cc_pll0.config = &sm8475_disp_cc_pll0_config;
+ disp_cc_pll1.config = &sm8475_disp_cc_pll1_config;
} else {
- clk_lucid_evo_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config);
- clk_lucid_evo_pll_configure(&disp_cc_pll1, regmap, &disp_cc_pll1_config);
+ disp_cc_pll0.config = &disp_cc_pll0_config;
+ disp_cc_pll1.config = &disp_cc_pll1_config;
}

/* Enable clock gating for MDP clocks */
regmap_update_bits(regmap, DISP_CC_MISC_CMD, 0x10, 0x10);

- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0xe05c); /* DISP_CC_XO_CLK */
-
ret = qcom_cc_really_probe(&pdev->dev, &disp_cc_sm8450_desc, regmap);
if (ret)
goto err_put_rpm;

--
2.55.0