summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_mmc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 04b7540226..d7f0648d92 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -78,7 +78,16 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
load.read = h_spl_load_read;
ret = spl_load_simple_fit(&load, sector, header);
} else {
+#if !defined(CONFIG_SPL_LOAD_FIT_ONLY)
ret = mmc_load_legacy(mmc, sector, header);
+#else
+ /* legacy (raw binary) images must be disallowed when
+ * SPL_LOAD_FIT_ONLY is configured to support the
+ * probing of multiple boot-devices (where some might
+ * contain 'random' data and cause a crash).
+ */
+ ret = -1;
+#endif
}
end: