]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: synchronize the sequence with enum bus_mode in mmc.h
authorJaehoon Chung <jh80.chung@samsung.com>
Tue, 30 Jan 2018 05:10:16 +0000 (14:10 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 21 Feb 2018 09:04:25 +0000 (18:04 +0900)
If some configs are disabled, number of freqs array will not assigned to
correct value with bus_mode.
Synchornize the ordering with enum bus_mode in mmc.h.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/mmc.c

index fb303dc21e2d6059a0a3fe7a549f776ac229db66..5d9b54149a426a719393cdc08f1448e8000be9ac 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)