]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx9: clock: clear HW_CTRL_SEL
authorPeng Fan <peng.fan@nxp.com>
Fri, 28 Apr 2023 04:08:29 +0000 (12:08 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 21 May 2023 14:54:40 +0000 (16:54 +0200)
The HW_CTRL_SEL should be cleared when configuring PLL to avoid
potential glitch

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/imx9/clock.c

index a5f95fbcb8aa9d87a2164b8d27c929910443851d..38e4cbbcc37615bb7b66f9e44a75f802a6f33c49 100644 (file)
@@ -206,6 +206,9 @@ int configure_intpll(enum ccm_clk_src pll, u32 freq)
                return -EPERM;
        }
 
+       /* Clear PLL HW CTRL SEL */
+       setbits_le32(&reg->ctrl.reg_clr, PLL_CTRL_HW_CTRL_SEL);
+
        /* Bypass the PLL to ref */
        writel(PLL_CTRL_CLKMUX_BYPASS, &reg->ctrl.reg_set);