Merge tag 'u-boot-rockchip-20191124' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / drivers / mmc / sti_sdhci.c
index 1c92bb2b377dc0fb7cfbb5583a6e231b27e61937..d6c75ea60105baab9e2e27ed5c89a74a448fc454 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
  * Author(s): Patrice Chotard, <patrice.chotard@st.com> for STMicroelectronics.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -98,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);