diff options
author | Dong Aisheng <b29396@freescale.com> | 2013-11-22 20:39:15 +0800 |
---|---|---|
committer | Dong Aisheng <b29396@freescale.com> | 2013-11-22 21:22:27 +0800 |
commit | f28344cbd86690327f69e3777c6ad0c905947a1f (patch) | |
tree | f4981d50e05aaa27bbad758c54d988b0ac18394b /drivers | |
parent | 91355d534f60879480747e5b8a1a113533bb9caa (diff) |
ENGR00289406-2 mmc: sdhci-esdhc-imx: add SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER
The max timeout counter for uSDHC is SDCLK x (1 << 28), not as standard
controller defined as TMCLK x (1 <<27).
Add SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER quirk to handle it.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 5b9d1ad3f9e64617f4d9acee7620f6bf892b9662)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 84f3751d0663..adb5a8d6ab56 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -908,6 +908,11 @@ static int esdhc_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs) return esdhc_change_pinstate(host, uhs); } +static unsigned int esdhc_get_max_timeout_counter(struct sdhci_host *host) +{ + return 1 << 28; +} + static struct sdhci_ops sdhci_esdhc_ops = { .read_l = esdhc_readl_le, .read_w = esdhc_readw_le, @@ -1057,7 +1062,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) */ if (esdhc_is_usdhc(imx_data)) { writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL); - host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN; + host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN | + SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER; host->mmc->caps |= MMC_CAP_1_8V_DDR; /* @@ -1065,6 +1071,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) * TO1.1, it's harmless for MX6SL */ writel(readl(host->ioaddr + 0x6c) | BIT(7), host->ioaddr + 0x6c); + sdhci_esdhc_ops.get_max_timeout_counter = + esdhc_get_max_timeout_counter; } if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING) |