diff options
| author | Abel Vesa <abel.vesa@oss.qualcomm.com> | 2026-09-24 15:06:19 +0300 |
|---|---|---|
| committer | Bjorn Andersson <andersson@kernel.org> | 2026-09-25 11:27:12 -0500 |
| commit | 3e421998bf409ea3d6981af7285b7464d5256c29 (patch) | |
| tree | 11936e474dc06db9c63c8fe6cd057627de775111 /drivers/clk/qcom | |
| parent | 7455a58f12d121e9a6f7077974bc1d693e171421 (diff) | |
| download | linux-next-3e421998bf409ea3d6981af7285b7464d5256c29.tar.gz linux-next-3e421998bf409ea3d6981af7285b7464d5256c29.zip | |
clk: qcom: dispcc-sm4450: 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-7-1479443ee016@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/clk/qcom')
| -rw-r--r-- | drivers/clk/qcom/dispcc-sm4450.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/clk/qcom/dispcc-sm4450.c b/drivers/clk/qcom/dispcc-sm4450.c index 4a4811db55dd..f39afa067cc6 100644 --- a/drivers/clk/qcom/dispcc-sm4450.c +++ b/drivers/clk/qcom/dispcc-sm4450.c @@ -719,7 +719,18 @@ static const struct regmap_config disp_cc_sm4450_regmap_config = { .fast_io = true, }; +static const u32 disp_cc_sm4450_critical_cbcrs[] = { + 0xe070, /* DISP_CC_SLEEP_CLK */ + 0xe054, /* DISP_CC_XO_CLK */ +}; + +static const struct qcom_cc_driver_data disp_cc_sm4450_driver_data = { + .clk_cbcrs = disp_cc_sm4450_critical_cbcrs, + .num_clk_cbcrs = ARRAY_SIZE(disp_cc_sm4450_critical_cbcrs), +}; + static const struct qcom_cc_desc disp_cc_sm4450_desc = { + .driver_data = &disp_cc_sm4450_driver_data, .config = &disp_cc_sm4450_regmap_config, .clks = disp_cc_sm4450_clocks, .num_clks = ARRAY_SIZE(disp_cc_sm4450_clocks), @@ -746,10 +757,6 @@ static int disp_cc_sm4450_probe(struct platform_device *pdev) clk_lucid_evo_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config); clk_lucid_evo_pll_configure(&disp_cc_pll1, regmap, &disp_cc_pll0_config); - /* Keep some clocks always enabled */ - qcom_branch_set_clk_en(regmap, 0xe070); /* DISP_CC_SLEEP_CLK */ - qcom_branch_set_clk_en(regmap, 0xe054); /* DISP_CC_XO_CLK */ - return qcom_cc_really_probe(&pdev->dev, &disp_cc_sm4450_desc, regmap); } |
