]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: fsl_esdhc_imx: fix mmc->clock with actual clock
authorSean Anderson <sean.anderson@seco.com>
Tue, 23 Nov 2021 20:03:41 +0000 (15:03 -0500)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 12 Jan 2022 00:56:39 +0000 (09:56 +0900)
[ fsl_esdhc commit 30f6444d024a74ee48aa6969c1531aecd3c59deb ]

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

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/fsl_esdhc_imx.c

index 4d2d7577239c6a6ef49cfe4148d2c6408b90bbe5..72f3eec2059bec3dcbcfb8a3ea7b9c08e0d30d76 100644 (file)
@@ -665,6 +665,7 @@ static void set_sysctl(struct fsl_esdhc_priv *priv, struct mmc *mmc, uint clock)
        esdhc_setbits32(&regs->sysctl, SYSCTL_PEREN | SYSCTL_CKEN);
 #endif
 
+       mmc->clock = sdhc_clk / pre_div / div;
        priv->clock = clock;
 }