diff options
| author | Simon Glass <sjg@chromium.org> | 2013-03-11 07:40:13 +0000 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-03-15 16:14:00 -0400 | 
| commit | e424c15c1f4ef8a084120f111d95da60676ba1cc (patch) | |
| tree | 6e709c7576dc6a66c623d9784b22963d42e81f36 | |
| parent | 86cfb6bdecc3a312a939bbd89560f500f45193c3 (diff) | |
| download | olio-uboot-2014.01-e424c15c1f4ef8a084120f111d95da60676ba1cc.tar.xz olio-uboot-2014.01-e424c15c1f4ef8a084120f111d95da60676ba1cc.zip | |
x86: Enable generic board support
This enables generic board support so that x86 boards can define
CONFIG_SYS_GENERIC_BOARD.
Signed-off-by: Simon Glass <sjg@chromium.org>
| -rw-r--r-- | arch/x86/config.mk | 3 | ||||
| -rw-r--r-- | arch/x86/include/asm/u-boot.h | 11 | ||||
| -rw-r--r-- | arch/x86/lib/Makefile | 3 | ||||
| -rw-r--r-- | common/board_r.c | 2 | 
4 files changed, 19 insertions, 0 deletions
| diff --git a/arch/x86/config.mk b/arch/x86/config.mk index 23cacffde..168dc24fd 100644 --- a/arch/x86/config.mk +++ b/arch/x86/config.mk @@ -36,6 +36,9 @@ PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86)  PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm  PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0 +# Support generic board on x86 +__HAVE_ARCH_GENERIC_BOARD := y +  PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden  PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions diff --git a/arch/x86/include/asm/u-boot.h b/arch/x86/include/asm/u-boot.h index 2f45c7b3d..df759faec 100644 --- a/arch/x86/include/asm/u-boot.h +++ b/arch/x86/include/asm/u-boot.h @@ -39,6 +39,13 @@  #include <config.h>  #include <compiler.h> +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else + +#ifndef __ASSEMBLY__ +  typedef struct bd_info {  	unsigned long	bi_memstart;	/* start of DRAM memory */  	phys_size_t	bi_memsize;	/* size	 of DRAM memory in bytes */ @@ -60,6 +67,10 @@ typedef struct bd_info {  	}bi_dram[CONFIG_NR_DRAM_BANKS];  } bd_t; +#endif /* __ASSEMBLY__ */ + +#endif /* !CONFIG_SYS_GENERIC_BOARD */ +  /* For image.h:image_check_target_arch() */  #define IH_ARCH_DEFAULT IH_ARCH_I386 diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 9b24dc5fd..ee8935480 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -25,7 +25,10 @@ include $(TOPDIR)/config.mk  LIB	= $(obj)lib$(ARCH).o +ifeq ($(CONFIG_SYS_GENERIC_BOARD),)  COBJS-y	+= board.o +endif +  COBJS-y	+= bootm.o  COBJS-y	+= cmd_boot.o  COBJS-y	+= gcc.o diff --git a/common/board_r.c b/common/board_r.c index 63c69365b..9605f80a0 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -507,11 +507,13 @@ static int show_model_r(void)  #endif  /* enable exceptions */ +#ifdef CONFIG_ARM  static int initr_enable_interrupts(void)  {  	enable_interrupts();  	return 0;  } +#endif  #ifdef CONFIG_CMD_NET  static int initr_ethaddr(void) |