summaryrefslogtreecommitdiff
path: root/drivers/mmc/sti_sdhci.c
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2019-07-24 09:51:02 +0200
committerPatrice Chotard <patrice.chotard@st.com>2019-08-27 09:36:56 +0200
commit2e01fcf17c221cba2b54d0f238a39f12b0ef361a (patch)
tree4463066c46a5ac8c3278ddb771af5b3dac901c32 /drivers/mmc/sti_sdhci.c
parent23441fbf2bc8c3c00355be0340137bda327a8ff4 (diff)
mmc: sti_sdhci: Fix sdhci_setup_cfg() call.
host->mmc, host->mmc->dev and host->mmc->priv must be set before calling sdhci_setup_cfg() to avoid hang during mmc initialization. Thanks to commit 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask") which put this issue into evidence. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers/mmc/sti_sdhci.c')
-rw-r--r--drivers/mmc/sti_sdhci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c
index 8ed47e113d..d6c75ea601 100644
--- a/drivers/mmc/sti_sdhci.c
+++ b/drivers/mmc/sti_sdhci.c
@@ -97,14 +97,14 @@ static int sti_sdhci_probe(struct udevice *dev)
SDHCI_QUIRK_NO_HISPD_BIT;
host->host_caps = MMC_MODE_DDR_52MHz;
+ host->mmc = &plat->mmc;
+ host->mmc->dev = dev;
+ host->mmc->priv = host;
ret = sdhci_setup_cfg(&plat->cfg, host, 50000000, 400000);
if (ret)
return ret;
- host->mmc = &plat->mmc;
- host->mmc->priv = host;
- host->mmc->dev = dev;
upriv->mmc = host->mmc;
return sdhci_probe(dev);