]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ppc: Enable generic board support
authorSimon Glass <sjg@chromium.org>
Mon, 11 Mar 2013 06:50:01 +0000 (06:50 +0000)
committerTom Rini <trini@ti.com>
Fri, 15 Mar 2013 20:14:00 +0000 (16:14 -0400)
This enables generic board support so that ppc boards can define
CONFIG_SYS_GENERIC_BOARD.

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

index b7062818bbf45c458ebf34c713eedaefa7939c06..e32d2bf4090167c82c841b923a9fbdaa55bc8d33 100644 (file)
@@ -29,6 +29,9 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
 
+# Support generic board on PPC
+__HAVE_ARCH_GENERIC_BOARD := y
+
 #
 # When cross-compiling on NetBSD, we have to define __PPC__ or else we
 # will pick up a va_list declaration that is incompatible with the
index 7229a98eaa35a5ad077e4c5c79155bcff95da1fc..cf972d20ce9e2b856aeb5dabdb6a7274eccca0df 100644 (file)
  * include/asm-ppc/u-boot.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 {
@@ -144,6 +149,8 @@ typedef struct bd_info {
 
 #endif /* __ASSEMBLY__ */
 
+#endif /* !CONFIG_SYS_GENERIC_BOARD */
+
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_PPC
 
index 86cf02ace4147f8fc29ad727dc5e44879844b632..59c723b07091d0c8b111c217ef92b7034c32e9d9 100644 (file)
@@ -59,8 +59,10 @@ SOBJS-y      += reloc.o
 
 COBJS-$(CONFIG_BAT_RW) += bat_rw.o
 ifndef CONFIG_SPL_BUILD
+ifndef CONFIG_SYS_GENERIC_BOARD
 COBJS-y        += board.o
 endif
+endif
 COBJS-y        += bootm.o
 COBJS-y        += cache.o
 COBJS-y        += extable.o