Merge git://git.denx.de/u-boot-socfpga
[oweals/u-boot.git] / drivers / mmc / rockchip_sdhci.c
index 8868f341f3375f0bb40e220b9b914030120fd153..dd3d5574dbc74dd5f46baae1d1f7d912983e074d 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2016 Fuzhou Rockchip Electronics Co., Ltd
  *
  * Rockchip SD Host Controller Interface
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -69,15 +68,15 @@ static int arasan_sdhci_probe(struct udevice *dev)
        if (host->bus_width == 8)
                host->host_caps |= MMC_MODE_8BIT;
 
-       ret = sdhci_setup_cfg(&plat->cfg, host, 0, EMMC_MIN_FREQ);
-
        host->mmc = &plat->mmc;
-       if (ret)
-               return ret;
        host->mmc->priv = &prv->host;
        host->mmc->dev = dev;
        upriv->mmc = host->mmc;
 
+       ret = sdhci_setup_cfg(&plat->cfg, host, 0, EMMC_MIN_FREQ);
+       if (ret)
+               return ret;
+
        return sdhci_probe(dev);
 }