From: Sean Anderson Date: Tue, 23 Nov 2021 20:03:41 +0000 (-0500) Subject: mmc: fsl_esdhc_imx: fix mmc->clock with actual clock X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4ea11bf241cc19612fc1352d886e64890561f344;p=u-boot.git mmc: fsl_esdhc_imx: fix mmc->clock with actual clock [ 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 Signed-off-by: Sean Anderson Reviewed-by: Jaehoon Chung --- diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 4d2d757723..72f3eec205 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -665,6 +665,7 @@ static void set_sysctl(struct fsl_esdhc_priv *priv, struct mmc *mmc, uint clock) esdhc_setbits32(®s->sysctl, SYSCTL_PEREN | SYSCTL_CKEN); #endif + mmc->clock = sdhc_clk / pre_div / div; priv->clock = clock; }