Skip to content

Commit 7ad43a1

Browse files
committed
Merge branch 'fixes' into next
2 parents de21dc1 + 499ed50 commit 7ad43a1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/mmc/host/sdhci-esdhc-imx.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,20 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
688688
return;
689689
}
690690

691+
/* For i.MX53 eSDHCv3, SYSCTL.SDCLKFS may not be set to 0. */
692+
if (is_imx53_esdhc(imx_data)) {
693+
/*
694+
* According to the i.MX53 reference manual, if DLLCTRL[10] can
695+
* be set, then the controller is eSDHCv3, else it is eSDHCv2.
696+
*/
697+
val = readl(host->ioaddr + ESDHC_DLL_CTRL);
698+
writel(val | BIT(10), host->ioaddr + ESDHC_DLL_CTRL);
699+
temp = readl(host->ioaddr + ESDHC_DLL_CTRL);
700+
writel(val, host->ioaddr + ESDHC_DLL_CTRL);
701+
if (temp & BIT(10))
702+
pre_div = 2;
703+
}
704+
691705
temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL);
692706
temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN
693707
| ESDHC_CLOCK_MASK);

0 commit comments

Comments
 (0)