Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi
[platform/kernel/u-boot.git] / drivers / mmc / sdhci.c
index 9b7c5f8..372dc0a 100644 (file)
@@ -658,6 +658,20 @@ int sdhci_probe(struct udevice *dev)
        return sdhci_init(mmc);
 }
 
+static int sdhci_deferred_probe(struct udevice *dev)
+{
+       int err;
+       struct mmc *mmc = mmc_get_mmc_dev(dev);
+       struct sdhci_host *host = mmc->priv;
+
+       if (host->ops && host->ops->deferred_probe) {
+               err = host->ops->deferred_probe(host);
+               if (err)
+                       return err;
+       }
+       return 0;
+}
+
 static int sdhci_get_cd(struct udevice *dev)
 {
        struct mmc *mmc = mmc_get_mmc_dev(dev);
@@ -692,6 +706,7 @@ const struct dm_mmc_ops sdhci_ops = {
        .send_cmd       = sdhci_send_command,
        .set_ios        = sdhci_set_ios,
        .get_cd         = sdhci_get_cd,
+       .deferred_probe = sdhci_deferred_probe,
 #ifdef MMC_SUPPORTS_TUNING
        .execute_tuning = sdhci_execute_tuning,
 #endif
@@ -824,8 +839,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
                cfg->host_caps &= ~MMC_MODE_HS_52MHz;
        }
 
-       if (!(cfg->voltages & MMC_VDD_165_195) ||
-           (host->quirks & SDHCI_QUIRK_NO_1_8_V))
+       if (!(cfg->voltages & MMC_VDD_165_195))
                caps_1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
                            SDHCI_SUPPORT_DDR50);