Skip to content

Commit 85e8ee5

Browse files
Satya Priya Kakitapalliandersson
authored andcommitted
clk: qcom: clk-alpha-pll: Fix zonda set_rate failure when PLL is disabled
Currently, clk_zonda_pll_set_rate polls for the PLL to lock even if the PLL is disabled. However, if the PLL is disabled then LOCK_DET will never assert and we'll return an error. There is no reason to poll LOCK_DET if the PLL is already disabled, so skip polling in this case. Fixes: f21b6bf ("clk: qcom: clk-alpha-pll: add support for zonda pll") Cc: [email protected] Signed-off-by: Satya Priya Kakitapalli <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 4ad1ed6 commit 85e8ee5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/clk/qcom/clk-alpha-pll.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,9 @@ static int clk_zonda_pll_set_rate(struct clk_hw *hw, unsigned long rate,
21362136
regmap_write(pll->clkr.regmap, PLL_ALPHA_VAL(pll), a);
21372137
regmap_write(pll->clkr.regmap, PLL_L_VAL(pll), l);
21382138

2139+
if (!clk_hw_is_enabled(hw))
2140+
return 0;
2141+
21392142
/* Wait before polling for the frequency latch */
21402143
udelay(5);
21412144

0 commit comments

Comments
 (0)