]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/mmc.c
mmc: Poll for broken card detection case
[u-boot] / drivers / mmc / mmc.c
index 2d0e7bb3a27cdc3dace9381c7ab8bd1f34ff19f9..255310a8e619c1e229f883a25c07455b872e19d7 100644 (file)
@@ -2493,8 +2493,12 @@ int mmc_start_init(struct mmc *mmc)
        mmc->host_caps = mmc->cfg->host_caps | MMC_CAP(SD_LEGACY) |
                         MMC_CAP(MMC_LEGACY) | MMC_MODE_1BIT;
 
+#if !defined(CONFIG_MMC_BROKEN_CD)
        /* we pretend there's no card when init is NULL */
        no_card = mmc_getcd(mmc) == 0;
+#else
+       no_card = 0;
+#endif
 #if !CONFIG_IS_ENABLED(DM_MMC)
        no_card = no_card || (mmc->cfg->ops->init == NULL);
 #endif