diff mbox series

[v3,06/12] mmc: fsl_esdhc_imx: fix mmc->clock with actual clock

Message ID 20211123200347.3772343-7-sean.anderson@seco.com
State Accepted
Commit 4ea11bf241cc19612fc1352d886e64890561f344
Delegated to: Jaehoon Chung
Headers show
Series fsl_esdhc_imx: port several patches from fsl_esdhc | expand

Commit Message

Sean Anderson Nov. 23, 2021, 8:03 p.m. UTC
[ 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>
---

(no changes since v1)

 drivers/mmc/fsl_esdhc_imx.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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(&regs->sysctl, SYSCTL_PEREN | SYSCTL_CKEN);
 #endif
 
+	mmc->clock = sdhc_clk / pre_div / div;
 	priv->clock = clock;
 }