Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 908165b

Browse files
rocflyer1gregkh
authored andcommitted
clk: imx: fracn-gppll: fix fractional part of PLL getting lost
[ Upstream commit 7622f88 ] Fractional part of PLL gets lost after re-enabling the PLL. the MFN can NOT be automatically loaded when doing frac PLL enable/disable, So when re-enable PLL, configure mfn explicitly. Fixes: 1b26cb8 ("clk: imx: support fracn gppll") Signed-off-by: Pengfei Li <pengfei.li_1@nxp.com> Reviewed-by: Jacky Bai <ping.bai@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20240607133347.3291040-5-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ed32365 commit 908165b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ static int clk_fracn_gppll_prepare(struct clk_hw *hw)
291291
if (val & POWERUP_MASK)
292292
return 0;
293293

294+
if (pll->flags & CLK_FRACN_GPPLL_FRACN)
295+
writel_relaxed(readl_relaxed(pll->base + PLL_NUMERATOR),
296+
pll->base + PLL_NUMERATOR);
297+
294298
val |= CLKMUX_BYPASS;
295299
writel_relaxed(val, pll->base + PLL_CTRL);
296300

0 commit comments

Comments
 (0)