From patchwork Sat Sep 1 08:05:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 181125 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3F89B2C007E for ; Sat, 1 Sep 2012 18:06:11 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D3F0D28088; Sat, 1 Sep 2012 10:06:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XDhjdvLBHXcp; Sat, 1 Sep 2012 10:06:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C430F28084; Sat, 1 Sep 2012 10:06:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 99F7828084 for ; Sat, 1 Sep 2012 10:06:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eEqEL2m8Vw2X for ; Sat, 1 Sep 2012 10:06:05 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtpi4.ngi.it (smtpi4.ngi.it [88.149.128.104]) by theia.denx.de (Postfix) with ESMTP id EB9F128083 for ; Sat, 1 Sep 2012 10:06:03 +0200 (CEST) Received: from paperina.lan (88-149-182-160.v4.ngi.it [88.149.182.160]) by smtpi4.ngi.it (Postfix) with ESMTP id 9275A42249; Sat, 1 Sep 2012 10:06:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by paperina.lan (Postfix) with ESMTP id 505F1140A109; Sat, 1 Sep 2012 10:06:02 +0200 (CEST) Received: from paperina.lan ([127.0.0.1]) by localhost (paperina.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RUsvshZgXKmE; Sat, 1 Sep 2012 10:05:59 +0200 (CEST) Received: from papero.lan (papero.lan [192.168.2.247]) by paperina.lan (Postfix) with ESMTP id 659FA140A024; Sat, 1 Sep 2012 10:05:59 +0200 (CEST) From: Stefano Babic To: U-Boot Mailing List Date: Sat, 1 Sep 2012 10:05:55 +0200 Message-Id: <1346486755-19500-1-git-send-email-sbabic@denx.de> X-Mailer: git-send-email 1.7.9.5 Cc: marex@denx.de Subject: [U-Boot] [PATCH v1] MX: set a common place to share code for Freescale i.MX X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Reviewed-by: Marek Vasut --- Makefile | 4 ++-- arch/arm/{cpu/armv7 => }/imx-common/Makefile | 2 ++ arch/arm/{cpu/armv7 => }/imx-common/cmd_bmode.c | 0 arch/arm/{cpu/armv7 => }/imx-common/cpu.c | 0 arch/arm/{cpu/armv7 => }/imx-common/i2c.c | 0 arch/arm/{cpu/armv7 => }/imx-common/iomux-v3.c | 0 arch/arm/{cpu/armv7 => }/imx-common/speed.c | 0 arch/arm/{cpu/armv7 => }/imx-common/timer.c | 0 8 files changed, 4 insertions(+), 2 deletions(-) rename arch/arm/{cpu/armv7 => }/imx-common/Makefile (97%) rename arch/arm/{cpu/armv7 => }/imx-common/cmd_bmode.c (100%) rename arch/arm/{cpu/armv7 => }/imx-common/cpu.c (100%) rename arch/arm/{cpu/armv7 => }/imx-common/i2c.c (100%) rename arch/arm/{cpu/armv7 => }/imx-common/iomux-v3.c (100%) rename arch/arm/{cpu/armv7 => }/imx-common/speed.c (100%) rename arch/arm/{cpu/armv7 => }/imx-common/timer.c (100%) diff --git a/arch/arm/cpu/armv7/imx-common/cmd_bmode.c b/arch/arm/imx-common/cmd_bmode.c similarity index 100% rename from arch/arm/cpu/armv7/imx-common/cmd_bmode.c rename to arch/arm/imx-common/cmd_bmode.c diff --git a/arch/arm/cpu/armv7/imx-common/cpu.c b/arch/arm/imx-common/cpu.c similarity index 100% rename from arch/arm/cpu/armv7/imx-common/cpu.c rename to arch/arm/imx-common/cpu.c diff --git a/arch/arm/cpu/armv7/imx-common/i2c.c b/arch/arm/imx-common/i2c.c similarity index 100% rename from arch/arm/cpu/armv7/imx-common/i2c.c rename to arch/arm/imx-common/i2c.c diff --git a/arch/arm/cpu/armv7/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c similarity index 100% rename from arch/arm/cpu/armv7/imx-common/iomux-v3.c rename to arch/arm/imx-common/iomux-v3.c diff --git a/arch/arm/cpu/armv7/imx-common/speed.c b/arch/arm/imx-common/speed.c similarity index 100% rename from arch/arm/cpu/armv7/imx-common/speed.c rename to arch/arm/imx-common/speed.c diff --git a/arch/arm/cpu/armv7/imx-common/timer.c b/arch/arm/imx-common/timer.c similarity index 100% rename from arch/arm/cpu/armv7/imx-common/timer.c rename to arch/arm/imx-common/timer.c diff --git a/Makefile b/Makefile index d27bb17..10af1d3 100644 --- a/Makefile +++ b/Makefile @@ -306,10 +306,10 @@ LIBS-y += $(CPUDIR)/omap-common/libomap-common.o endif ifeq ($(SOC),mx5) -LIBS-y += $(CPUDIR)/imx-common/libimx-common.o +LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o endif ifeq ($(SOC),mx6) -LIBS-y += $(CPUDIR)/imx-common/libimx-common.o +LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o endif ifeq ($(SOC),s5pc1xx) diff --git a/arch/arm/cpu/armv7/imx-common/Makefile b/arch/arm/imx-common/Makefile similarity index 97% rename from arch/arm/cpu/armv7/imx-common/Makefile rename to arch/arm/imx-common/Makefile index 16fba8d..d5dc6c0 100644 --- a/arch/arm/cpu/armv7/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -27,7 +27,9 @@ 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 +endif COBJS-$(CONFIG_I2C_MXC) += i2c.o COBJS-$(CONFIG_CMD_BMODE) += cmd_bmode.o COBJS := $(sort $(COBJS-y))