Allow booting with spl_load_fit_image() if LOAD_FIT_FULL enabled.
Signed-off-by: Nikita Shubin <[email protected]>
---
common/spl/spl_ram.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 0c501cf02f2..551cd8f4e2d 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -81,11 +81,15 @@ static int spl_ram_load_image(struct spl_image_info
*spl_image,
if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
image_get_magic(header) == FDT_MAGIC) {
- struct spl_load_info load;
-
debug("Found FIT\n");
- spl_load_init(&load, spl_ram_load_read, NULL, 1);
- ret = spl_load_simple_fit(spl_image, &load, 0, header);
+ if (CONFIG_IS_ENABLED(LOAD_FIT_FULL)) {
+ ret = spl_load_fit_image(spl_image, header);
+ } else {
+ struct spl_load_info load;
+
+ spl_load_init(&load, spl_ram_load_read, NULL, 1);
+ ret = spl_load_simple_fit(spl_image, &load, 0, header);
+ }
} else {
ulong u_boot_pos = spl_get_image_pos();
--
2.52.0