mmc: fsl_esdhc: fix mmc->clock with actual clock

Fix mmc->clock with actual clock which is divided by the
controller, and record it with priv->clock which was removed
accidentally.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
This commit is contained in:
Yangbo Lu 2020-09-01 16:58:06 +08:00 committed by Peng Fan
parent db8f93672b
commit 30f6444d02

View file

@ -523,6 +523,9 @@ static void set_sysctl(struct fsl_esdhc_priv *priv, struct mmc *mmc, uint clock)
while (sdhc_clk / (div * pre_div) > clock && div < 16)
div++;
mmc->clock = sdhc_clk / pre_div / div;
priv->clock = mmc->clock;
pre_div >>= 1;
div -= 1;