[U-Boot] [RFC] mmc: fsl_esdhc: Do not set high speed mode on MX25 and MX51

Fabio Estevam fabio.estevam at nxp.com
Wed Oct 18 15:57:03 UTC 2017


Currently when a high speed SD card is connected on MX25 or MX51 boards
the following error happens:

U-Boot 2017.11-rc2 (Oct 18 2017 - 13:49:26 -0200)

CPU:   Freescale i.MX51 rev3.0 at 800 MHz
Reset cause: POR
Board: MX51EVK
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - read failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC
Hit any key to stop autoboot:  0
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... failed

Workaround this issue by not setting the mmc high speed mode flags even
if the HOSTCAPBLT register reports that the SD card can operate at
high speed.

Tested on imx51evk and imx25pdk boards.

Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
---
Kernel is capable of running the SD card at 50MHz clock, but U-Boot fails.

I haven't had a chance to debug this further, but sending it as RFC in case
someone has some suggestions.

 drivers/mmc/fsl_esdhc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index cc188c4..5ec51a2 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -850,8 +850,10 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
 			cfg->host_caps &= ~MMC_MODE_4BIT;
 	}
 
+#if !defined(CONFIG_MX25) && !defined(CONFIG_MX51)
 	if (caps & ESDHC_HOSTCAPBLT_HSS)
 		cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
+#endif
 
 #ifdef CONFIG_ESDHC_DETECT_8_BIT_QUIRK
 	if (CONFIG_ESDHC_DETECT_8_BIT_QUIRK)
-- 
2.7.4



More information about the U-Boot mailing list