From f7e27cc5ee13aebce4e81fcf908d22d2d55d61e0 Mon Sep 17 00:00:00 2001 From: "Haijun.Zhang" Date: Fri, 10 Jan 2014 13:52:17 +0800 Subject: esdhc: Workaround for card can't be detected on T4240QDS Card detection pin is ineffective on T4240QDS Rev1.0. There are two cards can be connected to board. 1. eMMC card is built-in board, can not be removed. so For eMMC card it is always there. 2. Card detecting pin is functional for SDHC card in Rev2.0. This workaround force sdhc driver scan and initialize the card regardless of whether the card is inserted or not in case Rev1.0. Signed-off-by: Haijun Zhang Acked-by: Pantelis Antoniou Reviewed-by: York Sun --- drivers/mmc/fsl_esdhc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/mmc/fsl_esdhc.c') diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index e3cd0c777e..f79f167a7d 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; +#ifdef CONFIG_ESDHC_DETECT_QUIRK + if (CONFIG_ESDHC_DETECT_QUIRK) + return 1; +#endif while (!(esdhc_read32(®s->prsstat) & PRSSTAT_CINS) && --timeout) udelay(1000); -- cgit v1.2.3