]> git.baikalelectronics.ru Git - uboot.git/commit
imx8ulp: clock: Handle the DDRLOCKED when setting DDR clock
authorYe Li <ye.li@nxp.com>
Fri, 29 Oct 2021 01:46:30 +0000 (09:46 +0800)
committerStefano Babic <sbabic@denx.de>
Sat, 5 Feb 2022 12:38:39 +0000 (13:38 +0100)
commitcd831aad174451255ea614ba848c04431a775947
treeb509804bac75fde3dbdc2fd9a314c8673a8e3046
parent1a92ab1ce6a516551544a38cd0ac7cc076ebcd62
imx8ulp: clock: Handle the DDRLOCKED when setting DDR clock

The DDRLOCKED bit in CGC2 DDRCLK will auto lock up and down by HW
according to DDR DIV updating or DDR CLK halt status change. So DDR
PCC disable/enable will trigger the lock up/down flow. We
need wait until unlock to ensure clock is ready.

And before configuring the DDRCLK DIV, we need polling the DDRLOCKED
until it is unlocked. Otherwise writing ti DIV bits will not set.

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