From patchwork Fri Dec 18 02:05:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 558718 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 4F9851402E2 for ; Fri, 18 Dec 2015 13:07:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 36CC9A75F8; Fri, 18 Dec 2015 03:07:22 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dutcMhOtb8ga; Fri, 18 Dec 2015 03:07:22 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 40651A7600; Fri, 18 Dec 2015 03:06:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 487A0A75D2 for ; Fri, 18 Dec 2015 03:05:50 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aM5NlqynV1Wq for ; Fri, 18 Dec 2015 03:05:50 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 IN_IX_MANITU=4.35 (only DNSBL check requested) Received: from conuserg011-v.nifty.com (conuserg011.nifty.com [202.248.44.37]) by theia.denx.de (Postfix) with ESMTPS id A6BD6A75BE for ; Fri, 18 Dec 2015 03:05:36 +0100 (CET) Received: from beagle.diag.org (p14090-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.90]) (authenticated) by conuserg011-v.nifty.com with ESMTP id tBI24cbE019247; Fri, 18 Dec 2015 11:04:43 +0900 X-Nifty-SrcIP: [153.142.97.90] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 18 Dec 2015 11:05:01 +0900 Message-Id: <1450404310-20396-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450404310-20396-1-git-send-email-yamada.masahiro@socionext.com> References: <1450404310-20396-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini , Guilherme Maciel Ferreira , Joe Hershberger , Jan Kiszka , Michal Simek , Ruchika Gupta , "Albert ARIBAUD \(3ADEV\)" , Alexey Brodkin , Ian Campbell , Sonic Zhang , York Sun Subject: [U-Boot] [PATCH 02/11] image: zap IMAGE_ENABLE_OF_LIBFDT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Do not use a macro that just ends up in unreadable code. Signed-off-by: Masahiro Yamada --- arch/arc/lib/bootm.c | 2 +- arch/arm/lib/bootm.c | 4 ++-- common/image.c | 6 +++--- include/image.h | 6 ------ 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c index 04d9d9c..c8569a6 100644 --- a/arch/arc/lib/bootm.c +++ b/arch/arc/lib/bootm.c @@ -75,7 +75,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) cleanup_before_linux(); - if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) { r0 = 2; r2 = (unsigned int)images->ft_addr; } else { diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index a477cae..85adad1 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -205,7 +205,7 @@ static void boot_prep_linux(bootm_headers_t *images) { char *commandline = getenv("bootargs"); - if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) { #ifdef CONFIG_OF_LIBFDT debug("using: FDT\n"); if (image_setup_linux(images)) { @@ -302,7 +302,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) bootstage_mark(BOOTSTAGE_ID_RUN_OS); announce_and_cleanup(fake); - if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) r2 = (unsigned long)images->ft_addr; else r2 = gd->bd->bi_boot_params; diff --git a/common/image.c b/common/image.c index d980725..2c5e0b5 100644 --- a/common/image.c +++ b/common/image.c @@ -1343,7 +1343,7 @@ int image_setup_linux(bootm_headers_t *images) ulong rd_len; int ret; - if (IMAGE_ENABLE_OF_LIBFDT) + if (IS_ENABLED(CONFIG_OF_LIBFDT)) boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree); if (IMAGE_BOOT_GET_CMDLINE) { @@ -1362,13 +1362,13 @@ int image_setup_linux(bootm_headers_t *images) return ret; } - if (IMAGE_ENABLE_OF_LIBFDT) { + if (IS_ENABLED(CONFIG_OF_LIBFDT)) { ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size); if (ret) return ret; } - if (IMAGE_ENABLE_OF_LIBFDT && of_size) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && of_size) { ret = image_setup_libfdt(images, *of_flat_tree, of_size, lmb); if (ret) return ret; diff --git a/include/image.h b/include/image.h index 9eab991..d19f45c 100644 --- a/include/image.h +++ b/include/image.h @@ -96,12 +96,6 @@ struct lmb; #endif /* CONFIG_FIT */ -#ifdef CONFIG_OF_LIBFDT -# define IMAGE_ENABLE_OF_LIBFDT 1 -#else -# define IMAGE_ENABLE_OF_LIBFDT 0 -#endif - #ifdef CONFIG_SYS_BOOT_GET_CMDLINE # define IMAGE_BOOT_GET_CMDLINE 1 #else