x86: Enable generic board support
authorSimon Glass <sjg@chromium.org>
Mon, 11 Mar 2013 07:40:13 +0000 (07:40 +0000)
committerTom Rini <trini@ti.com>
Fri, 15 Mar 2013 20:14:00 +0000 (16:14 -0400)
This enables generic board support so that x86 boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/config.mk
arch/x86/include/asm/u-boot.h
arch/x86/lib/Makefile
common/board_r.c

index 23cacffdedeae65bca6464df98569fc2c5cb4907..168dc24fda3584b2c8c727ce406188f27ac75cf8 100644 (file)
@@ -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
index 2f45c7b3d749fada710dc8f7605f58f169c25d41..df759faec403099ddf7d91beeb99816e829734d8 100644 (file)
 #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
 
index 9b24dc5fdf025eac7e727c84ee6eb998124c26a4..ee89354808659d24177931b47db133c5ffa19f2d 100644 (file)
@@ -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
index 63c69365b19733ed53a29ef71c370a644e03087a..9605f80a0cbfb61523534bb9a11e0f0ef20fd428 100644 (file)
@@ -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)