[v4, 08/11] mmc: fsl_esdhc: fix mmc->clock with actual clock
Yangbo Lu
yangbo.lu at nxp.com
Tue Sep 1 10:58:06 CEST 2020
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 at nxp.com>
---
Changes for v2:
- Added this patch.
Changes for v3:
- None.
Changes for v4:
- None.
---
drivers/mmc/fsl_esdhc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index c53751d..ce87416 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -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;
--
2.7.4
More information about the U-Boot
mailing list