diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2018-01-15 13:53:10 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-01-15 13:53:10 +0100 |
commit | 7ad43a1498d3f72d2e4ebefff64cbc09abd0115a (patch) | |
tree | bb9dedd0cda183e8b30b0982a83824ee60fe3d52 /drivers/mmc | |
parent | de21dc1d9a2a9fc5023c1fe3a24ba21e68c34928 (diff) | |
parent | 499ed50f603b4c9834197b2411ba3bd9aaa624d4 (diff) | |
download | linux-7ad43a1498d3f72d2e4ebefff64cbc09abd0115a.tar.bz2 |
Merge branch 'fixes' into next
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 53cc1b6caf8f..cd2b5f643a15 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -688,6 +688,20 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host, return; } + /* For i.MX53 eSDHCv3, SYSCTL.SDCLKFS may not be set to 0. */ + if (is_imx53_esdhc(imx_data)) { + /* + * According to the i.MX53 reference manual, if DLLCTRL[10] can + * be set, then the controller is eSDHCv3, else it is eSDHCv2. + */ + val = readl(host->ioaddr + ESDHC_DLL_CTRL); + writel(val | BIT(10), host->ioaddr + ESDHC_DLL_CTRL); + temp = readl(host->ioaddr + ESDHC_DLL_CTRL); + writel(val, host->ioaddr + ESDHC_DLL_CTRL); + if (temp & BIT(10)) + pre_div = 2; + } + temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN | ESDHC_CLOCK_MASK); |