diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-18 13:49:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-18 13:49:26 -0500 |
commit | 79683f80e4f07dba13cc08d0ebcf5c7b0aa1bf68 (patch) | |
tree | e9a711609996dd406b31ae420f1a7b34347bc987 | |
parent | 023080317d2b8a2bee52780d0060d12e172cfb63 (diff) | |
parent | 499ed50f603b4c9834197b2411ba3bd9aaa624d4 (diff) |
Merge tag 'mmc-v4.15-rc2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fix from Ulf Hansson:
"sdhci-esdhc-imx: Fixup clock to make i.MX53 Loco (IMX53QSB) boot
again"
* tag 'mmc-v4.15-rc2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: sdhci-esdhc-imx: Fix i.MX53 eSDHCv3 clock
-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 85140c9af581..8b941f814472 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c | |||
@@ -687,6 +687,20 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host, | |||
687 | return; | 687 | return; |
688 | } | 688 | } |
689 | 689 | ||
690 | /* For i.MX53 eSDHCv3, SYSCTL.SDCLKFS may not be set to 0. */ | ||
691 | if (is_imx53_esdhc(imx_data)) { | ||
692 | /* | ||
693 | * According to the i.MX53 reference manual, if DLLCTRL[10] can | ||
694 | * be set, then the controller is eSDHCv3, else it is eSDHCv2. | ||
695 | */ | ||
696 | val = readl(host->ioaddr + ESDHC_DLL_CTRL); | ||
697 | writel(val | BIT(10), host->ioaddr + ESDHC_DLL_CTRL); | ||
698 | temp = readl(host->ioaddr + ESDHC_DLL_CTRL); | ||
699 | writel(val, host->ioaddr + ESDHC_DLL_CTRL); | ||
700 | if (temp & BIT(10)) | ||
701 | pre_div = 2; | ||
702 | } | ||
703 | |||
690 | temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); | 704 | temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); |
691 | temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN | 705 | temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN |
692 | | ESDHC_CLOCK_MASK); | 706 | | ESDHC_CLOCK_MASK); |