[U-Boot] [PATCH 1/3] esdhc: Workaround for card can't be detected on T4240QDS

Haijun Zhang Haijun.Zhang at freescale.com
Mon Dec 2 06:25:51 CET 2013


Card detection pin is ineffective on T4240QDS.
This workaround force sdhc driver scan and initialize the card regardless
of whether the card is inserted. if no card is in the slot, the error message
"card is not inserted" will be prompted.

Signed-off-by: Haijun Zhang <Haijun.Zhang at freescale.com>
---
 drivers/mmc/fsl_esdhc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index e3cd0c7..e330379 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -500,6 +500,10 @@ static int esdhc_getcd(struct mmc *mmc)
 	struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
 	int timeout = 1000;
 
+/* Card detecting pin is not functional on T4240QDS */
+#if defined(CONFIG_T4240QDS)
+	return 1;
+#endif
 	while (!(esdhc_read32(&regs->prsstat) & PRSSTAT_CINS) && --timeout)
 		udelay(1000);
 
-- 
1.8.4




More information about the U-Boot mailing list