summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorYinbo Zhu <yinbo.zhu@nxp.com>2018-11-23 04:15:33 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2018-12-17 08:26:24 +0100
commitcc14eec0889bb06abab3d6ea1e0e0676521542c8 (patch)
tree67554ff20919840d9e3f52c172144850d1f608ae /drivers/mmc/core
parentmmc: sdhci-omap: Remove redundant structure assignments (diff)
downloadlinux-cc14eec0889bb06abab3d6ea1e0e0676521542c8.tar.xz
linux-cc14eec0889bb06abab3d6ea1e0e0676521542c8.zip
mmc: core: Add ->hs400_prepare_ddr() callback
Some eMMC controllers need specific settings for HS400 mode before the speed mode can be switched to DDR mode, during the HS400 initialization sequence. For that reason, let's introduce a new host callback, ->hs400_prepare_ddr() and invoked it just before switching to DDR mode. Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/mmc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index bc1bd2c25613..4ff08ea930a6 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1181,6 +1181,9 @@ static int mmc_select_hs400(struct mmc_card *card)
if (err)
goto out_err;
+ if (host->ops->hs400_prepare_ddr)
+ host->ops->hs400_prepare_ddr(host);
+
/* Switch card to DDR */
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
EXT_CSD_BUS_WIDTH,