From 37d82beb57fa5ff2cee42b7caebfbb9f6c2c3f42 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 17 Oct 2013 20:38:54 +0900 Subject: [PATCH] ARM: tegra: move Tegra specific code under arch/arm/ 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 Cc: Tom Warren --- 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 diff --git a/Makefile b/Makefile index f4bde335d8..7e5fd9466b 100644 --- a/Makefile +++ b/Makefile @@ -314,11 +314,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 0000000000..fd0da530e1 --- /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 243a123378..6badb3bb84 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 8a8b602741..2c17322f0c 100644 --- a/arch/arm/cpu/armv7/Makefile +++ b/arch/arm/cpu/armv7/Makefile @@ -20,3 +20,5 @@ ifneq ($(CONFIG_ARMV7_NONSEC)$(CONFIG_ARMV7_VIRT),) obj-y += nonsec_virt.o obj-y += virt-v7.o endif + +obj-$(CONFIG_TEGRA) += tegra-common/ diff --git a/spl/Makefile b/spl/Makefile index d24c1cd4da..d3dc51133e 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -109,11 +109,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 -- 2.30.2