]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mmc/mmc.c
mmc: Drop unnecessary case for mmc_probe()
[people/ms/u-boot.git] / drivers / mmc / mmc.c
index 3a2e3b353fe2409eb48c03b962c89107ba5ff8ac..31f65f6e242f6eb57d2ffddbd3146e42e014d6e0 100644 (file)
@@ -181,23 +181,18 @@ const char *mmc_mode_name(enum bus_mode mode)
 static uint mmc_mode2freq(struct mmc *mmc, enum bus_mode mode)
 {
        static const int freqs[] = {
+             [MMC_LEGACY]      = 25000000,
              [SD_LEGACY]       = 25000000,
              [MMC_HS]          = 26000000,
              [SD_HS]           = 50000000,
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+             [MMC_HS_52]       = 52000000,
+             [MMC_DDR_52]      = 52000000,
              [UHS_SDR12]       = 25000000,
              [UHS_SDR25]       = 50000000,
              [UHS_SDR50]       = 100000000,
              [UHS_DDR50]       = 50000000,
-#ifdef MMC_SUPPORTS_TUNING
              [UHS_SDR104]      = 208000000,
-#endif
-#endif
-             [MMC_HS_52]       = 52000000,
-             [MMC_DDR_52]      = 52000000,
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
              [MMC_HS_200]      = 200000000,
-#endif
        };
 
        if (mode == MMC_LEGACY)
@@ -1333,7 +1328,7 @@ static int sd_set_card_speed(struct mmc *mmc, enum bus_mode mode)
        if (err)
                return err;
 
-       if ((__be32_to_cpu(switch_status[4]) >> 24) != speed)
+       if (((__be32_to_cpu(switch_status[4]) >> 24) & 0xF) != speed)
                return -ENOTSUPP;
 
        return 0;
@@ -1950,6 +1945,7 @@ static int mmc_startup_v4(struct mmc *mmc)
                MMC_VERSION_4_1,
                MMC_VERSION_4_2,
                MMC_VERSION_4_3,
+               MMC_VERSION_4_4,
                MMC_VERSION_4_41,
                MMC_VERSION_4_5,
                MMC_VERSION_5_0,
@@ -2657,12 +2653,7 @@ void mmc_set_preinit(struct mmc *mmc, int preinit)
        mmc->preinit = preinit;
 }
 
-#if CONFIG_IS_ENABLED(DM_MMC) && defined(CONFIG_SPL_BUILD)
-static int mmc_probe(bd_t *bis)
-{
-       return 0;
-}
-#elif CONFIG_IS_ENABLED(DM_MMC)
+#if CONFIG_IS_ENABLED(DM_MMC)
 static int mmc_probe(bd_t *bis)
 {
        int ret, i;