summaryrefslogtreecommitdiffstats
path: root/arch/ppc/Makefile
diff options
context:
space:
mode:
authorRenaud Barbier <renaud.barbier@ge.com>2012-05-01 10:26:00 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-05-02 10:16:30 +0200
commitbd20ba67987875283cabba9e9e813e6dc355281a (patch)
tree058c0fb76d7e59ebe5ee6e91e27e82b2acda3218 /arch/ppc/Makefile
parent84aec66a831990874e98340ce4d3ccadb82d9236 (diff)
downloadbarebox-bd20ba67987875283cabba9e9e813e6dc355281a.tar.gz
barebox-bd20ba67987875283cabba9e9e813e6dc355281a.tar.xz
Preparation stage to support multiple PPC architectures
arch/ppc/Kconfig is reworked to make the configuration environment architecture neutral. All MPC5200 configuration is moved to the MPC5200 architecture specific configuration file. These modifications are reflected in the PCM030 board support. arch/ppc/Makefile compilation directives are updated in preparation for the introduction of future cpus/machines. lib/time.c is moved to the architecture specific directory and the building instructions updated in the Make files. The file is cleaned up of unused code. The definition of L1_CACHE_... is updated and CACHELINE_SIZE is defined in ppc/include/asm/cache.h for future use by the mpc85xx. The file mach-mpc5xxx/pci_mpc5200.c and mach-mpc5xxx/start.S are updated accordingly. The declaration of search_exception_table is moved in include/asm/common.h because it is used across architectures. mach-mpc5xxx/traps.c is also updated to reflect this change. The definition of exception in asm/ppc_asm.tmpl is updated for future use by the mpc85xx. The file starts.S in mach-mpc5xxx is updated accordingly. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/Makefile')
-rw-r--r--arch/ppc/Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index c7bf863747..2d9e47fe56 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -1,16 +1,15 @@
-CPPFLAGS += -ffixed-r14 \
+CPPFLAGS += -ffixed-r14 -m32 \
-meabi -D __PPC__ -D CONFIG_PPC \
- -fno-strict-aliasing
+ -fno-strict-aliasing -mno-spe -mspe=no
ifdef CONFIG_RELOCATABLE
CPPFLAGS += -fPIC -mrelocatable
endif
-machine-$(CONFIG_ARCH_MPC5200) := mpc5200
board-$(CONFIG_MACH_PHYCORE_MPC5200B_TINY) := pcm030
-cpu-$(CONFIG_ARCH_MPC5200) := mpc5xxx
+machine-$(CONFIG_ARCH_MPC5200) := mpc5xxx
TEXT_BASE = $(CONFIG_TEXT_BASE)
@@ -21,7 +20,7 @@ ifndef CONFIG_MODULES
CPPFLAGS += -fdata-sections -ffunction-sections
endif
-machdirs := $(patsubst %,arch/ppc/mach-%/,$(cpu-y))
+machdirs := $(patsubst %,arch/ppc/mach-%/,$(machine-y))
ifeq ($(KBUILD_SRC),)
CPPFLAGS += $(patsubst %,-I%include,$(machdirs))
@@ -40,13 +39,19 @@ else
BOARD :=
endif
+ifneq ($(machine-y),)
+MACH := arch/ppc/mach-$(machine-y)/
+else
+MACH :=
+endif
+
ifneq ($(cpu-y),)
-CPU := arch/ppc/mach-$(cpu-y)/
+CPU := arch/ppc/cpu-$(cpu-y)/
else
CPU :=
endif
-common-y += $(BOARD) $(CPU)
+common-y += $(BOARD) $(CPU) $(MACH)
common-y += arch/ppc/lib/
lds-y += $(BOARD)/barebox.lds