summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-09-25 19:43:21 -0600
committerTom Rini <trini@konsulko.com>2021-10-08 15:53:26 -0400
commit0c303f9a6628de9664b4f9140464a6f9d8224c36 (patch)
treeec2522fbeb6900049f363a27cc8642ec363cd38b /common
parentbf371b4cf599ad1a448577daaba997a0b0ba6c9c (diff)
image: Drop IMAGE_ENABLE_OF_LIBFDT
Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the tools build, so drop the unnecessary indirection. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/bootm.c4
-rw-r--r--common/image-board.c8
-rw-r--r--common/image.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 8d614fe140..4482f84b40 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -271,7 +271,7 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start,
return 1;
}
-#if IMAGE_ENABLE_OF_LIBFDT
+#if CONFIG_IS_ENABLED(OF_LIBFDT)
/* find flattened device tree */
ret = boot_get_fdt(flag, argc, argv, IH_ARCH_DEFAULT, &images,
&images.ft_addr, &images.ft_len);
@@ -706,7 +706,7 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
}
}
#endif
-#if IMAGE_ENABLE_OF_LIBFDT && defined(CONFIG_LMB)
+#if CONFIG_IS_ENABLED(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,
diff --git a/common/image-board.c b/common/image-board.c
index 0ad75fdc75..cb2479f2f3 100644
--- a/common/image-board.c
+++ b/common/image-board.c
@@ -282,7 +282,7 @@ int genimg_get_format(const void *img_addr)
if (image_check_magic(hdr))
return IMAGE_FORMAT_LEGACY;
#endif
-#if CONFIG_IS_ENABLED(FIT) || IMAGE_ENABLE_OF_LIBFDT
+#if CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT)
if (fdt_check_header(img_addr) == 0)
return IMAGE_FORMAT_FIT;
#endif
@@ -895,7 +895,7 @@ int image_setup_linux(bootm_headers_t *images)
struct lmb *lmb = &images->lmb;
int ret;
- if (IMAGE_ENABLE_OF_LIBFDT)
+ if (CONFIG_IS_ENABLED(OF_LIBFDT))
boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree);
if (IMAGE_BOOT_GET_CMDLINE) {
@@ -907,13 +907,13 @@ int image_setup_linux(bootm_headers_t *images)
}
}
- if (IMAGE_ENABLE_OF_LIBFDT) {
+ if (CONFIG_IS_ENABLED(OF_LIBFDT)) {
ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);
if (ret)
return ret;
}
- if (IMAGE_ENABLE_OF_LIBFDT && of_size) {
+ if (CONFIG_IS_ENABLED(OF_LIBFDT) && of_size) {
ret = image_setup_libfdt(images, *of_flat_tree, of_size, lmb);
if (ret)
return ret;
diff --git a/common/image.c b/common/image.c
index 59b5e70cca..5b77113bea 100644
--- a/common/image.c
+++ b/common/image.c
@@ -18,7 +18,7 @@
#include <status_led.h>
#endif
-#if CONFIG_IS_ENABLED(FIT) || IMAGE_ENABLE_OF_LIBFDT
+#if CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT)
#include <linux/libfdt.h>
#include <fdt_support.h>
#endif