From patchwork Tue Mar 31 05:34:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 244633 List-Id: U-Boot discussion From: rayagonda.kokatanur at broadcom.com (Rayagonda Kokatanur) Date: Tue, 31 Mar 2020 11:04:06 +0530 Subject: [PATCH v1 4/4] drivers: mmc: iproc_sdhci: move host.mmc init before sdhci_setup_cfg In-Reply-To: <20200331053406.23063-1-rayagonda.kokatanur@broadcom.com> References: <20200331053406.23063-1-rayagonda.kokatanur@broadcom.com> Message-ID: <20200331053406.23063-5-rayagonda.kokatanur@broadcom.com> move host.mmc before sdhci_setup_cfg Signed-off-by: Rayagonda Kokatanur Signed-off-by: Bharat Kumar Reddy Gooty --- drivers/mmc/iproc_sdhci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); }