Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: gpucc-sdm845: fix clk_dis_wait being programmed for CX GDSC

The gdsc_init() function will rewrite the CLK_DIS_WAIT field while
registering the GDSC (writing the value 0x2 by default). This will
override the setting done in the driver's probe function.

Set cx_gdsc.clk_dis_wait_val to 8 to follow the intention of the probe
function.

Fixes: 453361cdd757 ("clk: qcom: Add graphics clock controller driver for SDM845")
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230201172305.993146-2-dmitry.baryshkov@linaro.org

authored by

Dmitry Baryshkov and committed by
Bjorn Andersson
cb81719e 658c82ca

+1 -6
+1 -6
drivers/clk/qcom/gpucc-sdm845.c
··· 22 22 #define CX_GMU_CBCR_SLEEP_SHIFT 4 23 23 #define CX_GMU_CBCR_WAKE_MASK 0xf 24 24 #define CX_GMU_CBCR_WAKE_SHIFT 8 25 - #define CLK_DIS_WAIT_SHIFT 12 26 - #define CLK_DIS_WAIT_MASK (0xf << CLK_DIS_WAIT_SHIFT) 27 25 28 26 enum { 29 27 P_BI_TCXO, ··· 119 121 static struct gdsc gpu_cx_gdsc = { 120 122 .gdscr = 0x106c, 121 123 .gds_hw_ctrl = 0x1540, 124 + .clk_dis_wait_val = 0x8, 122 125 .pd = { 123 126 .name = "gpu_cx_gdsc", 124 127 }, ··· 191 192 mask |= CX_GMU_CBCR_SLEEP_MASK << CX_GMU_CBCR_SLEEP_SHIFT; 192 193 value = 0xf << CX_GMU_CBCR_WAKE_SHIFT | 0xf << CX_GMU_CBCR_SLEEP_SHIFT; 193 194 regmap_update_bits(regmap, 0x1098, mask, value); 194 - 195 - /* Configure clk_dis_wait for gpu_cx_gdsc */ 196 - regmap_update_bits(regmap, 0x106c, CLK_DIS_WAIT_MASK, 197 - 8 << CLK_DIS_WAIT_SHIFT); 198 195 199 196 return qcom_cc_really_probe(pdev, &gpu_cc_sdm845_desc, regmap); 200 197 }