Skip to content

Commit f300cb7

Browse files
MrVanabelvesa
authored andcommitted
clk: imx: clk-fracn-gppll: correct rdiv
According to Reference Manual: 000b - Divide by 1 001b - Divide by 1 010b - Divide by 2 011b - Divide by 3 100b - Divide by 4 101b - Divide by 5 110b - Divide by 6 111b - Divide by 7 So only need increase rdiv by 1 when the register value is 0. Fixes: 1b26cb8 ("clk: imx: support fracn gppll") Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Jacky Bai <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abel Vesa <[email protected]>
1 parent 5ebaf9f commit f300cb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/clk/imx/clk-fracn-gppll.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ static unsigned long clk_fracn_gppll_recalc_rate(struct clk_hw *hw, unsigned lon
149149
if (rate)
150150
return (unsigned long)rate;
151151

152-
rdiv = rdiv + 1;
152+
if (!rdiv)
153+
rdiv = rdiv + 1;
153154

154155
switch (odiv) {
155156
case 0:

0 commit comments

Comments
 (0)