Patchwork [U-Boot,v2,4/6] ARM: tegra: delete Tegra specific code from toplevel Makefile

login
register
mail settings
Submitter Masahiro Yamada
Date Sept. 27, 2013, 6:09 a.m.
Message ID <1380262192-24022-5-git-send-email-yamada.m@jp.panasonic.com>
Download mbox | patch
Permalink /patch/278478/
State Superseded
Delegated to: Tom Warren
Headers show

Comments

Masahiro Yamada - Sept. 27, 2013, 6:09 a.m.
This patch moves Tegra specific directory entries
from the toplevel Makefile and spl/Makefile
to arch/arm/cpu/*/Makefile using Kbuild descending feature.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Warren <TWarren@nvidia.com>
---

Changes for v2:
  - No change

 Makefile                      | 6 +-----
 arch/arm/cpu/Makefile         | 2 ++
 arch/arm/cpu/arm720t/Makefile | 2 ++
 arch/arm/cpu/armv7/Makefile   | 2 ++
 spl/Makefile                  | 6 +-----
 5 files changed, 8 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/cpu/Makefile
Stephen Warren - Sept. 27, 2013, 3:54 p.m.
On 09/27/2013 12:09 AM, Masahiro Yamada wrote:
> This patch moves Tegra specific directory entries
> from the toplevel Makefile and spl/Makefile
> to arch/arm/cpu/*/Makefile using Kbuild descending feature.

That sounds more like a "move" than a "delete", so the patch subject
sounds misleading...
Masahiro Yamada - Sept. 30, 2013, 8:41 a.m.
Hello Stephen

> > This patch moves Tegra specific directory entries
> > from the toplevel Makefile and spl/Makefile
> > to arch/arm/cpu/*/Makefile using Kbuild descending feature.
> 
> That sounds more like a "move" than a "delete", so the patch subject
> sounds misleading...

You are right.
I posted v3 with updated patch subjects.
Thanks!


Best Regards
Masahiro Yamada

Patch

diff --git a/Makefile b/Makefile
index 42616e3..92dc088 100644
--- a/Makefile
+++ b/Makefile
@@ -313,11 +313,7 @@  endif
 ifeq ($(SOC),exynos)
 LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o
 endif
-ifneq ($(CONFIG_TEGRA),)
-LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o
-LIBS-y += arch/$(ARCH)/cpu/tegra-common/libcputegra-common.o
-LIBS-y += $(CPUDIR)/tegra-common/libtegra-common.o
-endif
+LIBS-$(CONFIG_ARM) += arch/arm/cpu/libcpu.o
 
 LIBS := $(addprefix $(obj),$(sort $(LIBS-y)))
 .PHONY : $(LIBS)
diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile
new file mode 100644
index 0000000..fd0da53
--- /dev/null
+++ b/arch/arm/cpu/Makefile
@@ -0,0 +1,2 @@ 
+obj-$(CONFIG_TEGRA) += $(SOC)-common/
+obj-$(CONFIG_TEGRA) += tegra-common/
diff --git a/arch/arm/cpu/arm720t/Makefile b/arch/arm/cpu/arm720t/Makefile
index 243a123..6badb3b 100644
--- a/arch/arm/cpu/arm720t/Makefile
+++ b/arch/arm/cpu/arm720t/Makefile
@@ -7,3 +7,5 @@ 
 
 extra-y	= start.o
 obj-y	= interrupts.o cpu.o
+
+obj-$(CONFIG_TEGRA) += tegra-common/
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 75fac4b..7b260ac 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -15,3 +15,5 @@  obj-y	+= syslib.o
 ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_TI81XX),)
 obj-y	+= lowlevel_init.o
 endif
+
+obj-$(CONFIG_TEGRA) += tegra-common/
diff --git a/spl/Makefile b/spl/Makefile
index 3197d61..3f1a1da 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -108,11 +108,7 @@  ifneq (,$(CONFIG_MX23)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
 LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
 endif
 
-ifneq ($(CONFIG_TEGRA),)
-LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o
-LIBS-y += arch/$(ARCH)/cpu/tegra-common/libcputegra-common.o
-LIBS-y += $(CPUDIR)/tegra-common/libtegra-common.o
-endif
+LIBS-$(CONFIG_ARM) += arch/arm/cpu/libcpu.o
 
 ifneq ($(CONFIG_MX23)$(CONFIG_MX35),)
 LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o