diff options
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index d4ba277b572d..d85a6a6f9e29 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c | |||
@@ -45,6 +45,8 @@ | |||
45 | #define ESDHC_MIX_CTRL_FBCLK_SEL (1 << 25) | 45 | #define ESDHC_MIX_CTRL_FBCLK_SEL (1 << 25) |
46 | /* Bits 3 and 6 are not SDHCI standard definitions */ | 46 | /* Bits 3 and 6 are not SDHCI standard definitions */ |
47 | #define ESDHC_MIX_CTRL_SDHCI_MASK 0xb7 | 47 | #define ESDHC_MIX_CTRL_SDHCI_MASK 0xb7 |
48 | /* Tuning bits */ | ||
49 | #define ESDHC_MIX_CTRL_TUNING_MASK 0x03c00000 | ||
48 | 50 | ||
49 | /* dll control register */ | 51 | /* dll control register */ |
50 | #define ESDHC_DLL_CTRL 0x60 | 52 | #define ESDHC_DLL_CTRL 0x60 |
@@ -562,7 +564,10 @@ static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg) | |||
562 | * Do it manually here. | 564 | * Do it manually here. |
563 | */ | 565 | */ |
564 | if (esdhc_is_usdhc(imx_data)) { | 566 | if (esdhc_is_usdhc(imx_data)) { |
565 | writel(0, host->ioaddr + ESDHC_MIX_CTRL); | 567 | /* the tuning bits should be kept during reset */ |
568 | new_val = readl(host->ioaddr + ESDHC_MIX_CTRL); | ||
569 | writel(new_val & ESDHC_MIX_CTRL_TUNING_MASK, | ||
570 | host->ioaddr + ESDHC_MIX_CTRL); | ||
566 | imx_data->is_ddr = 0; | 571 | imx_data->is_ddr = 0; |
567 | } | 572 | } |
568 | } | 573 | } |