imx8ulp: clock: Fix lcd clock algo
authorLoic Poulain <loic.poulain@linaro.org>
Thu, 31 Mar 2022 10:39:37 +0000 (12:39 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 21 Apr 2022 10:44:23 +0000 (12:44 +0200)
commit85d0580e684c74dcb0a90aa0c010006cda40af44
treec2c32d8381100c8cb890dc904ca496daaf08d3d0
parent22bfaa1f673ab5442dfb9778eea4c9a18dee42d0
imx8ulp: clock: Fix lcd clock algo

The div loop uses reassign and reuse parent_rate, which causes
the parent rate reference to be wrong after the first loop, the
resulting clock becomes incorrect for div != 1.

Fixes: 829e06bf4175 ("imx8ulp: clock: Add MIPI DSI clock and DCNano clock")
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/imx8ulp/clock.c