[U-Boot] [PATCH 08/22] powerpc: move mpc8xxx entry under arch/powerpc/cpu/

Masahiro Yamada yamada.m at jp.panasonic.com
Mon Nov 11 06:35:56 CET 2013


Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---
 Makefile                          |  9 +--------
 arch/powerpc/cpu/Makefile         |  3 +++
 arch/powerpc/cpu/mpc8xxx/Makefile |  6 ++++++
 spl/Makefile                      | 13 +------------
 4 files changed, 11 insertions(+), 20 deletions(-)
 create mode 100644 arch/powerpc/cpu/Makefile

diff --git a/Makefile b/Makefile
index 419278a..3a8ea67 100644
--- a/Makefile
+++ b/Makefile
@@ -273,18 +273,10 @@ LIBS-y += drivers/power/libpower.o \
 LIBS-y += drivers/spi/libspi.o
 ifeq ($(CPU),mpc83xx)
 LIBS-y += drivers/qe/libqe.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
 endif
 ifeq ($(CPU),mpc85xx)
 LIBS-y += drivers/qe/libqe.o
 LIBS-y += drivers/net/fm/libfm.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-endif
-ifeq ($(CPU),mpc86xx)
-LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
 endif
 LIBS-y += drivers/serial/libserial.o
 LIBS-y += drivers/usb/eth/libusb_eth.o
@@ -305,6 +297,7 @@ LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
 endif
 
 LIBS-$(CONFIG_ARM) += arch/arm/cpu/libcpu.o
+LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/libcpu.o
 
 LIBS-y += board/$(BOARDDIR)/lib$(BOARD).o
 
diff --git a/arch/powerpc/cpu/Makefile b/arch/powerpc/cpu/Makefile
new file mode 100644
index 0000000..d630abe
--- /dev/null
+++ b/arch/powerpc/cpu/Makefile
@@ -0,0 +1,3 @@
+ifneq ($(filter mpc83xx mpc85xx mpc86xx,$(CPU)),)
+obj-y += mpc8xxx/
+endif
diff --git a/arch/powerpc/cpu/mpc8xxx/Makefile b/arch/powerpc/cpu/mpc8xxx/Makefile
index 395fed1..1d083bf 100644
--- a/arch/powerpc/cpu/mpc8xxx/Makefile
+++ b/arch/powerpc/cpu/mpc8xxx/Makefile
@@ -31,3 +31,9 @@ obj-$(CONFIG_SYS_SRIO) += srio.o
 obj-$(CONFIG_FSL_LAW) += law.o
 
 endif
+
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/
+else
+obj-y += ddr/
+endif
diff --git a/spl/Makefile b/spl/Makefile
index cbd3d27..0ac0c3c 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -57,18 +57,6 @@ endif
 LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
 
 LIBS-y += $(CPUDIR)/lib$(CPU).o
-ifeq ($(CPU),mpc83xx)
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-endif
-ifeq ($(CPU),mpc85xx)
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-ifdef CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o
-endif
-endif
-ifeq ($(CPU),mpc86xx)
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-endif
 
 ifdef SOC
 LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o
@@ -106,6 +94,7 @@ LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
 endif
 
 LIBS-$(CONFIG_ARM) += arch/arm/cpu/libcpu.o
+LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/libcpu.o
 
 ifneq ($(CONFIG_MX23)$(CONFIG_MX35),)
 LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
-- 
1.8.3.2



More information about the U-Boot mailing list