]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/spl/spl_mmc.c
Fix musl build
[karo-tx-uboot.git] / common / spl / spl_mmc.c
index 7bae16beba064472c5f4ebd48d17d4e63b3b78fc..e580f2291af24d78d64e098200cdbdf4734308ca 100644 (file)
@@ -10,7 +10,6 @@
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <mmc.h>
-#include <version.h>
 #include <image.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -172,11 +171,24 @@ void spl_mmc_load_image(void)
                err = mmc_load_image_raw_sector(mmc,
                        CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
 #endif
-       } else {
+       }
+
+       switch(boot_mode){
+               case MMCSD_MODE_RAW:
+#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
+               case MMCSD_MODE_FS:
+#endif
+#ifdef CONFIG_SUPPORT_EMMC_BOOT
+               case MMCSD_MODE_EMMCBOOT:
+#endif
+                       /* Boot mode is ok. Nothing to do. */
+                       break;
+               case MMCSD_MODE_UNDEFINED:
+               default:
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-               puts("spl: wrong MMC boot mode\n");
+                       puts("spl: wrong MMC boot mode\n");
 #endif
-               hang();
+                       hang();
        }
 
        if (err)