From: Simon Glass Date: Thu, 16 Feb 2012 06:49:05 -0800 Subject: [U-Boot] [PATCH v3 18/28] arm: Enable generic board support In-Reply-To: <1329403755-6396-1-git-send-email-sjg@chromium.org> References: <1329403755-6396-1-git-send-email-sjg@chromium.org> Message-ID: <1329403755-6396-19-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This enables generic board support so that ARM boards can define CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Simon Glass --- arch/arm/config.mk | 3 --- arch/arm/include/asm/global_data.h | 7 +++++++ arch/arm/include/asm/u-boot.h | 9 +++++++++ arch/arm/lib/Makefile | 4 +++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 31e9ef9..45f9dca 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -33,9 +33,6 @@ endif PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__ -# Move to unified board system later -CONFIG_SYS_LEGACY_BOARD := y - # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: PF_CPPFLAGS_ARM := $(call cc-option,-marm,) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index c3ff789..aced4fe 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -23,6 +23,11 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H + +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified global_data */ +#include +#else /* * The following data structure is placed in some memory which is * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or @@ -98,6 +103,8 @@ typedef struct global_data { #define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out) */ #define GD_FLG_ENV_READY 0x00080 /* Environment imported into hash table */ +#endif /* nCONFIG_SYS_GENERIC_BOARD */ + #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r8") #endif /* __ASM_GBL_DATA_H */ diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h index a0691b7..fe336b3 100644 --- a/arch/arm/include/asm/u-boot.h +++ b/arch/arm/include/asm/u-boot.h @@ -36,6 +36,12 @@ #ifndef _U_BOOT_H_ #define _U_BOOT_H_ 1 +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include +#else + +#ifndef __ASSEMBLY__ typedef struct bd_info { unsigned long bi_baudrate; /* serial console baudrate */ unsigned long bi_ip_addr; /* IP Address */ @@ -50,6 +56,9 @@ typedef struct bd_info { ulong size; } bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif + +#endif /* nCONFIG_SYS_GENERIC_BOARD */ /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_ARM diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 300c8fa..11cfc00 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -37,7 +37,9 @@ GLSOBJS += _umodsi3.o GLCOBJS += div0.o -COBJS-y += board.o +ifeq ($(CONFIG_SYS_GENERIC_BOARD),) +COBJS-y += board.o +endif COBJS-y += bootm.o COBJS-y += cache.o COBJS-y += cache-cp15.o -- 1.7.7.3