summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryinbo.zhu <yinbo.zhu@nxp.com>2017-09-28 10:42:46 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-12-12 07:32:39 (GMT)
commite51ae985273348fbaffffa58c0e3eca9a0ab773e (patch)
treee3df478c9fe9e2be8e8925236b70a2e91604fd2f
parentf0246a5e725d513c0552407f7694806fe437207c (diff)
downloadlinux-e51ae985273348fbaffffa58c0e3eca9a0ab773e.tar.xz
mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec
The bit eSDHC_TBCTL[TB_EN] couldn't be reset by eSDHC_SYSCTL[RSTA] which is used to reset for all. The driver should make sure it's cleared before card initialization, otherwise the initialization would fail. Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
-rw-r--r--drivers/mmc/host/sdhci-of-esdhc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 4b0f375..bfa0582 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -784,6 +784,10 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host)
pltfm_host = sdhci_priv(host);
esdhc = sdhci_pltfm_priv(pltfm_host);
+ val = sdhci_readl(host, ESDHC_TBCTL);
+ val &= ~ESDHC_TB_EN;
+ sdhci_writel(host, val, ESDHC_TBCTL);
+
host_ver = sdhci_readw(host, SDHCI_HOST_VERSION);
esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
SDHCI_VENDOR_VER_SHIFT;