aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-01-21 06:02:25 -0500
committerChris Ball <cjb@laptop.org>2013-02-24 14:37:01 -0500
commit58c8c4fbdb5576a0afa377b1a730566b25c25cba (patch)
treed5a160b44e01f6304d6b800c53663b08a0d17fa6 /drivers
parent69f5469822132c4ae0637eef2980dbaec5bb2b31 (diff)
mmc: sdhci-esdhc-imx: manually reset MIX_CTRL for usdhc
It's another violation to SDHC spec that software reset on usdhc does not reset MIX_CTRL register. Have to do it manually, otherwise the preserving of the register bits (e.g. AC23EN) may cause mmc card fail to be initialized. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 48832c567f72..968a70f1a420 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -318,8 +318,15 @@ static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg)
318 * circuit relies on. To work around it, we turn the clocks on back 318 * circuit relies on. To work around it, we turn the clocks on back
319 * to keep card detection circuit functional. 319 * to keep card detection circuit functional.
320 */ 320 */
321 if ((reg == SDHCI_SOFTWARE_RESET) && (val & 1)) 321 if ((reg == SDHCI_SOFTWARE_RESET) && (val & 1)) {
322 esdhc_clrset_le(host, 0x7, 0x7, ESDHC_SYSTEM_CONTROL); 322 esdhc_clrset_le(host, 0x7, 0x7, ESDHC_SYSTEM_CONTROL);
323 /*
324 * The reset on usdhc fails to clear MIX_CTRL register.
325 * Do it manually here.
326 */
327 if (is_imx6q_usdhc(imx_data))
328 writel(0, host->ioaddr + ESDHC_MIX_CTRL);
329 }
323} 330}
324 331
325static unsigned int esdhc_pltfm_get_max_clock(struct sdhci_host *host) 332static unsigned int esdhc_pltfm_get_max_clock(struct sdhci_host *host)