From 0c303f9a6628de9664b4f9140464a6f9d8224c36 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:21 -0600 Subject: 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 Reviewed-by: Alexandru Gagniuc --- common/bootm.c | 4 ++-- common/image-board.c | 8 ++++---- common/image.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'common') 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 #endif -#if CONFIG_IS_ENABLED(FIT) || IMAGE_ENABLE_OF_LIBFDT +#if CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT) #include #include #endif -- cgit v1.2.3