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