Some phases may wish to use full FIT-loading and others not, so allow
this to be controlled.

Add some debugging while we are here.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 include/spl_load.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/spl_load.h b/include/spl_load.h
index 935f7d336f2..525e0c9e86c 100644
--- a/include/spl_load.h
+++ b/include/spl_load.h
@@ -20,13 +20,15 @@ static inline int _spl_load(struct spl_image_info 
*spl_image,
        ulong base_offset, image_offset, overhead;
        int read, ret;
 
+       log_debug("\nloading hdr from %lx to %p\n", (ulong)offset, header);
        read = info->read(info, offset, ALIGN(sizeof(*header),
                                              spl_get_bl_len(info)), header);
        if (read < (int)sizeof(*header))
                return -EIO;
 
        if (image_get_magic(header) == FDT_MAGIC) {
-               if (IS_ENABLED(CONFIG_SPL_LOAD_FIT_FULL)) {
+               log_debug("Found FIT\n");
+               if (CONFIG_IS_ENABLED(LOAD_FIT_FULL)) {
                        void *buf;
 
                        /*
@@ -48,9 +50,12 @@ static inline int _spl_load(struct spl_image_info *spl_image,
                        return spl_parse_image_header(spl_image, bootdev, buf);
                }
 
-               if (IS_ENABLED(CONFIG_SPL_LOAD_FIT))
+               if (CONFIG_IS_ENABLED(LOAD_FIT)) {
+                       log_debug("Simple loading\n");
                        return spl_load_simple_fit(spl_image, info, offset,
                                                   header);
+               }
+               log_debug("No FIT support\n");
        }
 
        if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER) &&
-- 
2.43.0

Reply via email to