Skip to content

Commit 907f929

Browse files
Eugeniy Paltsevbebarino
authored andcommitted
CLK: HSDK: CGU: check if PLL is bypassed first
If PLL is bypassed the EN (enable) bit has no effect on output clock. Signed-off-by: Eugeniy Paltsev <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 8f3d9f3 commit 907f929

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/clk/clk-hsdk-pll.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ static unsigned long hsdk_pll_recalc_rate(struct clk_hw *hw,
172172

173173
dev_dbg(clk->dev, "current configuration: %#x\n", val);
174174

175-
/* Check if PLL is disabled */
176-
if (val & CGU_PLL_CTRL_PD)
177-
return 0;
178-
179175
/* Check if PLL is bypassed */
180176
if (val & CGU_PLL_CTRL_BYPASS)
181177
return parent_rate;
182178

179+
/* Check if PLL is disabled */
180+
if (val & CGU_PLL_CTRL_PD)
181+
return 0;
182+
183183
/* input divider = reg.idiv + 1 */
184184
idiv = 1 + ((val & CGU_PLL_CTRL_IDIV_MASK) >> CGU_PLL_CTRL_IDIV_SHIFT);
185185
/* fb divider = 2*(reg.fbdiv + 1) */

0 commit comments

Comments
 (0)