mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
clk: qcom: gpucc-sc7280: 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. Move the GMU branch register update into the clk_regs_configure callback so it still follows the always-on branch enables. 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-37-1479443ee016@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
f0e668b33e
commit
e51d7b2623
|
|
@ -440,7 +440,24 @@ static const struct regmap_config gpu_cc_sc7280_regmap_config = {
|
|||
.fast_io = true,
|
||||
};
|
||||
|
||||
static const u32 gpu_cc_sc7280_critical_cbcrs[] = {
|
||||
0x1170, /* GPU_CC_CB_CLK */
|
||||
0x1098, /* GPUCC_CX_GMU_CLK */
|
||||
};
|
||||
|
||||
static void gpu_cc_sc7280_regs_configure(struct device *dev, struct regmap *regmap)
|
||||
{
|
||||
regmap_update_bits(regmap, 0x1098, BIT(13), BIT(13));
|
||||
}
|
||||
|
||||
static const struct qcom_cc_driver_data gpu_cc_sc7280_driver_data = {
|
||||
.clk_cbcrs = gpu_cc_sc7280_critical_cbcrs,
|
||||
.num_clk_cbcrs = ARRAY_SIZE(gpu_cc_sc7280_critical_cbcrs),
|
||||
.clk_regs_configure = gpu_cc_sc7280_regs_configure,
|
||||
};
|
||||
|
||||
static const struct qcom_cc_desc gpu_cc_sc7280_desc = {
|
||||
.driver_data = &gpu_cc_sc7280_driver_data,
|
||||
.config = &gpu_cc_sc7280_regmap_config,
|
||||
.clks = gpu_cc_sc7280_clocks,
|
||||
.num_clks = ARRAY_SIZE(gpu_cc_sc7280_clocks),
|
||||
|
|
@ -464,11 +481,6 @@ static int gpu_cc_sc7280_probe(struct platform_device *pdev)
|
|||
|
||||
clk_lucid_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
|
||||
|
||||
/* Keep some clocks always-on */
|
||||
qcom_branch_set_clk_en(regmap, 0x1170); /* GPU_CC_CB_CLK */
|
||||
qcom_branch_set_clk_en(regmap, 0x1098); /* GPUCC_CX_GMU_CLK */
|
||||
regmap_update_bits(regmap, 0x1098, BIT(13), BIT(13));
|
||||
|
||||
return qcom_cc_really_probe(&pdev->dev, &gpu_cc_sc7280_desc, regmap);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user