Skip to content

Commit

Permalink
ppc: Enable generic board support
Browse files Browse the repository at this point in the history
This enables generic board support so that ppc boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <[email protected]>
  • Loading branch information
sjg20 authored and trini committed Mar 15, 2013
1 parent c2240d4 commit 660c60c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions arch/powerpc/include/asm/u-boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
* 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 {
Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 660c60c

Please sign in to comment.