]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers: mmc: iproc_sdhci: move host.mmc init before sdhci_setup_cfg
authorRayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Tue, 31 Mar 2020 05:34:06 +0000 (11:04 +0530)
committerPeng Fan <peng.fan@nxp.com>
Wed, 22 Apr 2020 12:41:55 +0000 (20:41 +0800)
move host.mmc before sdhci_setup_cfg

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
drivers/mmc/iproc_sdhci.c

index 0f4d608869dcd48adcf427e68cebb0bd2e12d58e..c2319b4134535f9f5f066a9d8054a4c92ee3d525 100644 (file)
@@ -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);
 }