]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/spl/spl_mmc.c
spl: eMMC/SD: Provide one __weak spl_boot_mode() function
[people/ms/u-boot.git] / common / spl / spl_mmc.c
index b57e0b04e46a3174a5ccead5c2489eb9c2ade1f0..351f4edd41e4ed52e8970cadcfc44f69a59e0037 100644 (file)
@@ -281,6 +281,17 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, struct mmc *mmc)
 }
 #endif
 
+u32 __weak spl_boot_mode(const u32 boot_device)
+{
+#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
+       return MMCSD_MODE_FS;
+#elif defined(CONFIG_SUPPORT_EMMC_BOOT)
+       return MMCSD_MODE_EMMCBOOT;
+#else
+       return MMCSD_MODE_RAW;
+#endif
+}
+
 int spl_mmc_load_image(struct spl_image_info *spl_image,
                       struct spl_boot_device *bootdev)
 {