summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2014-11-14 10:27:06 +0800
committerDong Aisheng <b29396@freescale.com>2015-01-21 18:23:32 +0800
commit2f77c6bad9a5693acdeab8381819dfbeb96f462d (patch)
tree24e657c65548e3dd79cbf5a7e0e78e4245a9b4b2 /drivers/mmc
parentb08f1641a96f57419082f110292723d52c4a5278 (diff)
MLK-9834 mmc: sdhci-esdhc-imx: fix SD3.0 failed to resume if M/F is enabled
Due to the power lost in suspend if Mega/Fast is enabled which is a new feature introduced, the static settings like tuning control in probe() function of controller will be lost which results in the later resume failed on tuning routine for SD3.0 cards(SDR50/SDR104). This patch moves the tunning setting from probe() function into register setting path before the tuning is executed. Then the tuning setting becomes dynamically and re-set again after resume for a SD3.0 card when doing tuning. Signed-off-by: Dong Aisheng <b29396@freescale.com> (cherry picked from commit 2fb6a74b8b91dad7e57d65a57eabd422a4acc25e)
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 2232aa6a20a0..0ceaedda723a 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -462,6 +462,10 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
if (val & SDHCI_CTRL_EXEC_TUNING) {
v |= ESDHC_MIX_CTRL_EXE_TUNE;
m |= ESDHC_MIX_CTRL_FBCLK_SEL;
+ writel(readl(host->ioaddr + ESDHC_TUNING_CTRL) |
+ ESDHC_STD_TUNING_EN |
+ ESDHC_TUNING_START_TAP,
+ host->ioaddr + ESDHC_TUNING_CTRL);
} else {
v &= ~ESDHC_MIX_CTRL_EXE_TUNE;
}
@@ -1072,11 +1076,6 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
sdhci_esdhc_ops.platform_execute_tuning =
esdhc_executing_tuning;
- if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING)
- writel(readl(host->ioaddr + ESDHC_TUNING_CTRL) |
- ESDHC_STD_TUNING_EN | ESDHC_TUNING_START_TAP,
- host->ioaddr + ESDHC_TUNING_CTRL);
-
if (imx_data->socdata->flags & ESDHC_FLAG_ERR004536)
host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;