From 70eb82539baa49407ccf78f79f5bef769fa73fab Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 20 Jan 2019 09:11:07 +0100 Subject: powerpc: enabled building with CONFIG_DM=y MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moving to the driver model requires CONFIG_DM to be enabled. Currently several boards like kmeter1_defconfig produce a build error when CONFIG_DM is enabled: In file included from include/common.h:35, from ./arch/powerpc/include/asm/fsl_lbc.h:10, from include/mpc83xx.h:10, from ./arch/powerpc/include/asm/ppc.h:27, from ./arch/powerpc/include/asm/u-boot.h:18, from include/dm/of.h:10, from include/dm/ofnode.h:12, from include/dm/device.h:13, from include/linux/mtd/mtd.h:26, from drivers/mtd/mtdconcat.c:25: include/image.h: In function ‘image_check_target_arch’: include/image.h:846:3: error: #error "please define IH_ARCH_DEFAULT in your arch asm/u-boot.h" # error "please define IH_ARCH_DEFAULT in your arch asm/u-boot.h" ^~~~~ include/image.h:848:31: error: ‘IH_ARCH_DEFAULT’ undeclared (first use in this function); did you mean ‘IH_ARCH_COUNT’? return image_check_arch(hdr, IH_ARCH_DEFAULT); The error can be avoided by moving the definition of IH_ARCH_DEFAULT before #include Signed-off-by: Heinrich Schuchardt Reviewed-by: Prabhakar Kushwaha --- arch/powerpc/include/asm/u-boot.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/u-boot.h b/arch/powerpc/include/asm/u-boot.h index 9e7e2d4..1841565 100644 --- a/arch/powerpc/include/asm/u-boot.h +++ b/arch/powerpc/include/asm/u-boot.h @@ -13,11 +13,11 @@ #ifndef __U_BOOT_H__ #define __U_BOOT_H__ +/* For image.h:image_check_target_arch() */ +#define IH_ARCH_DEFAULT IH_ARCH_PPC + /* Use the generic board which requires a unified bd_info */ #include #include -/* For image.h:image_check_target_arch() */ -#define IH_ARCH_DEFAULT IH_ARCH_PPC - #endif /* __U_BOOT_H__ */ -- cgit v1.1