]> git.baikalelectronics.ru Git - uboot.git/commit
mmc: fsl_esdhc_imx: correct the actual card clock
authorHaibo Chen <haibo.chen@nxp.com>
Fri, 11 Feb 2022 11:16:57 +0000 (19:16 +0800)
committerStefano Babic <sbabic@denx.de>
Sat, 19 Feb 2022 13:46:54 +0000 (14:46 +0100)
commit7136a7c731923347455e3868b5008ad652da93b2
treea20ba17b67c249e86afd13c78d6eafe231d4038c
parentbafadaf797057debc84f80cb3294ca14d5085335
mmc: fsl_esdhc_imx: correct the actual card clock

The original code logic can not show the correct card clock, and also
has one risk when the div is 0. Because there is div -=1 before.

So move the operation before div -=1, and also involve ddr_pre_div
to get the correct value.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
drivers/mmc/fsl_esdhc_imx.c