]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
MX: set a common place to share code for Freescale i.MX
authorStefano Babic <sbabic@denx.de>
Wed, 5 Sep 2012 20:16:36 +0000 (20:16 +0000)
committerStefano Babic <sbabic@denx.de>
Mon, 10 Sep 2012 12:24:29 +0000 (14:24 +0200)
Up now only MX5 and MX6 can share code, because they have
a common source directory in cpu/armv7. Other not armv7
i.MX can profit of the same shared code. Move these files
into a directory accessible for all, similar to plat-mxc
in linux.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Makefile
arch/arm/imx-common/Makefile [moved from arch/arm/cpu/armv7/imx-common/Makefile with 94% similarity]
arch/arm/imx-common/cmd_bmode.c [moved from arch/arm/cpu/armv7/imx-common/cmd_bmode.c with 100% similarity]
arch/arm/imx-common/cpu.c [moved from arch/arm/cpu/armv7/imx-common/cpu.c with 100% similarity]
arch/arm/imx-common/i2c-mxv7.c [moved from arch/arm/cpu/armv7/imx-common/i2c.c with 100% similarity]
arch/arm/imx-common/iomux-v3.c [moved from arch/arm/cpu/armv7/imx-common/iomux-v3.c with 100% similarity]
arch/arm/imx-common/speed.c [moved from arch/arm/cpu/armv7/imx-common/speed.c with 100% similarity]
arch/arm/imx-common/timer.c [moved from arch/arm/cpu/armv7/imx-common/timer.c with 100% similarity]

index e5f8d059a5da86e0fed97f1ece5d8f28b6c679cd..fe2f98c58b5bd9be8303141f2ff8ef8d8a9f0260 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -306,11 +306,8 @@ ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
-ifeq ($(SOC),mx5)
-LIBS-y += $(CPUDIR)/imx-common/libimx-common.o
-endif
-ifeq ($(SOC),mx6)
-LIBS-y += $(CPUDIR)/imx-common/libimx-common.o
+ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
+LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
 endif
 
 ifeq ($(SOC),s5pc1xx)
similarity index 94%
rename from arch/arm/cpu/armv7/imx-common/Makefile
rename to arch/arm/imx-common/Makefile
index 16fba8da938aa247eba57734767c7f6805299fbb..b3e608e9db01c32b057cd15beb69b2d802814678 100644 (file)
@@ -27,8 +27,10 @@ include $(TOPDIR)/config.mk
 
 LIB     = $(obj)libimx-common.o
 
+ifeq ($(SOC),$(filter $(SOC),mx5 mx6))
 COBJS-y        = iomux-v3.o timer.o cpu.o speed.o
-COBJS-$(CONFIG_I2C_MXC) += i2c.o
+COBJS-$(CONFIG_I2C_MXC) += i2c-mxv7.o
+endif
 COBJS-$(CONFIG_CMD_BMODE) += cmd_bmode.o
 COBJS  := $(sort $(COBJS-y))