Commit 7622f888 authored by Pengfei Li's avatar Pengfei Li Committed by Abel Vesa
Browse files

clk: imx: fracn-gppll: fix fractional part of PLL getting lost



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: 1b26cb8a ("clk: imx: support fracn gppll")
Signed-off-by: default avatarPengfei Li <pengfei.li_1@nxp.com>
Reviewed-by: default avatarJacky Bai <ping.bai@nxp.com>
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Reviewed-by: default avatarAbel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20240607133347.3291040-5-peng.fan@oss.nxp.com


Signed-off-by: default avatarAbel Vesa <abel.vesa@linaro.org>
parent 4717ccad
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -291,6 +291,10 @@ static int clk_fracn_gppll_prepare(struct clk_hw *hw)
	if (val & POWERUP_MASK)
		return 0;

	if (pll->flags & CLK_FRACN_GPPLL_FRACN)
		writel_relaxed(readl_relaxed(pll->base + PLL_NUMERATOR),
			       pll->base + PLL_NUMERATOR);

	val |= CLKMUX_BYPASS;
	writel_relaxed(val, pll->base + PLL_CTRL);