fdt: Allow libfdt to be used in SPL
[oweals/u-boot.git] / common / bootm.c
index ff566819cb7302ea520898d07a5885d3e28b4f62..c965326db4169de9a1254282029751ecedc266e0 100644 (file)
@@ -234,7 +234,7 @@ int bootm_find_images(int flag, int argc, char * const argv[])
                return 1;
        }
 
-#if defined(CONFIG_OF_LIBFDT)
+#if IMAGE_ENABLE_OF_LIBFDT
        /* find flattened device tree */
        ret = boot_get_fdt(flag, argc, argv, IH_ARCH_DEFAULT, &images,
                           &images.ft_addr, &images.ft_len);
@@ -644,7 +644,7 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
                }
        }
 #endif
-#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_LMB)
+#if IMAGE_ENABLE_OF_LIBFDT && defined(CONFIG_LMB)
        if (!ret && (states & BOOTM_STATE_FDT)) {
                boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr);
                ret = boot_relocate_fdt(&images->lmb, &images->ft_addr,