From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrice CHOTARD Date: Mon, 26 Aug 2019 13:48:50 +0000 Subject: [U-Boot] [PATCH v2] mmc: sti_sdhci: Fix sdhci_setup_cfg() call. In-Reply-To: <20190724075102.26679-1-patrice.chotard@st.com> References: <20190724075102.26679-1-patrice.chotard@st.com> Message-ID: <09ab2a9f-20cd-ba4e-3c7e-0e8a8ea73096@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 7/24/19 9:51 AM, Patrice Chotard wrote: > 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 > --- > > Changes in v2: > - move host->mmc->priv initialization before sdhci_setup_cfg() call > > drivers/mmc/sti_sdhci.c | 6 +++--- > 1 file 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); Applied on STM32 tree Thanks