[PATCH 24/42] imx9: clock: clear HW_CTRL_SEL

Peng Fan (OSS) peng.fan at oss.nxp.com
Fri Apr 28 06:08:29 CEST 2023


From: Peng Fan <peng.fan at nxp.com>

The HW_CTRL_SEL should be cleared when configuring PLL to avoid
potential glitch

Reviewed-by: Ye Li <ye.li at nxp.com>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
 arch/arm/mach-imx/imx9/clock.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c
index a5f95fbcb8a..38e4cbbcc37 100644
--- a/arch/arm/mach-imx/imx9/clock.c
+++ b/arch/arm/mach-imx/imx9/clock.c
@@ -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);
 
-- 
2.40.0



More information about the U-Boot mailing list