From: Rayagonda Kokatanur Date: Tue, 31 Mar 2020 05:34:06 +0000 (+0530) Subject: drivers: mmc: iproc_sdhci: move host.mmc init before sdhci_setup_cfg X-Git-Tag: v2020.07-rc1~22^2~9 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=29617ca39a087a3c78a2ea2515090b4aa24ad014;p=oweals%2Fu-boot.git drivers: mmc: iproc_sdhci: move host.mmc init before sdhci_setup_cfg move host.mmc before sdhci_setup_cfg Signed-off-by: Rayagonda Kokatanur Signed-off-by: Bharat Kumar Reddy Gooty --- diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c index 0f4d608869..c2319b4134 100644 --- a/drivers/mmc/iproc_sdhci.c +++ b/drivers/mmc/iproc_sdhci.c @@ -212,6 +212,11 @@ static int iproc_sdhci_probe(struct udevice *dev) memcpy(&iproc_host->host, host, sizeof(struct sdhci_host)); + iproc_host->host.mmc = &plat->mmc; + iproc_host->host.mmc->dev = dev; + iproc_host->host.mmc->priv = &iproc_host->host; + upriv->mmc = iproc_host->host.mmc; + ret = sdhci_setup_cfg(&plat->cfg, &iproc_host->host, f_min_max[1], f_min_max[0]); if (ret) { @@ -219,11 +224,6 @@ static int iproc_sdhci_probe(struct udevice *dev) return ret; } - iproc_host->host.mmc = &plat->mmc; - iproc_host->host.mmc->dev = dev; - iproc_host->host.mmc->priv = &iproc_host->host; - upriv->mmc = iproc_host->host.mmc; - return sdhci_probe(dev); }