]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/mmc.c
Prepare v2018.03-rc1
[u-boot] / drivers / mmc / mmc.c
index 311f51f237776aba735deef51237196da0359158..255310a8e619c1e229f883a25c07455b872e19d7 100644 (file)
@@ -1501,7 +1501,7 @@ static int mmc_set_ios(struct mmc *mmc)
 
 int mmc_set_clock(struct mmc *mmc, uint clock, bool disable)
 {
-       if (!disable && clock != 0) {
+       if (!disable) {
                if (clock > mmc->cfg->f_max)
                        clock = mmc->cfg->f_max;
 
@@ -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