All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC] mmc: fsl_esdhc: Do not set high speed mode on MX25 and MX51
@ 2017-10-18 15:57 Fabio Estevam
  2017-10-18 16:04 ` Otavio Salvador
  2017-10-18 16:13 ` Benoît Thébaudeau
  0 siblings, 2 replies; 25+ messages in thread
From: Fabio Estevam @ 2017-10-18 15:57 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2017-11-04 11:59 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 15:57 [U-Boot] [RFC] mmc: fsl_esdhc: Do not set high speed mode on MX25 and MX51 Fabio Estevam
2017-10-18 16:04 ` Otavio Salvador
2017-10-18 16:13 ` Benoît Thébaudeau
2017-10-18 16:20   ` Benoît Thébaudeau
2017-10-18 16:40   ` Fabio Estevam
2017-10-18 16:56     ` Benoît Thébaudeau
2017-10-18 17:35       ` Fabio Estevam
2017-10-18 20:10         ` Benoît Thébaudeau
2017-10-18 20:14           ` Fabio Estevam
2017-10-19 11:57           ` Fabio Estevam
2017-10-19 12:42             ` Fabio Estevam
2017-10-19 12:46               ` Otavio Salvador
2017-10-19 12:52                 ` Fabio Estevam
2017-10-19 12:54                   ` Benoît Thébaudeau
2017-10-20 12:40             ` Benoît Thébaudeau
2017-10-20 18:40               ` Fabio Estevam
2017-10-21 12:34                 ` Benoît Thébaudeau
2017-10-21 12:38                   ` Fabio Estevam
2017-10-23 22:45                     ` Benoît Thébaudeau
2017-10-24  8:50                       ` Fabio Estevam
2017-10-29 21:18                         ` Benoît Thébaudeau
2017-10-30  2:10                           ` Fabio Estevam
2017-11-03 15:17                           ` Fabio Estevam
2017-11-03 21:25                             ` Benoît Thébaudeau
2017-11-04 11:59                               ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.