From f3f4e41c825b5444ee14b37385f162edc4aefdd2 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 17 Aug 2012 00:16:08 +0000 Subject: [PATCH] ARM: imx: build i.MX6 functions only when needed commit 1fc593feaf8e440511f381f4cdff483b55bbf546 upstream. The head-v7.S contains a call to the generic cpu_suspend function, which is only available when selected by the i.MX6 code. As pointed out by Shawn Guo, i.MX5 does not actually use any functions defined in head-v7.S. It is also needed only for the i.MX6 power management code and for the SMP code, so we can restrict building this file to situations in which at least one of those two is present. Finally, other platforms with a similar file call it headsmp.S, so we can rename it to the same for consistency. Without this patch, building imx5 standalone results in: arch/arm/mach-imx/built-in.o: In function `v7_cpu_resume': arch/arm/mach-imx/head-v7.S:104: undefined reference to `cpu_resume' Signed-off-by: Arnd Bergmann Acked-by: Shawn Guo Cc: Eric Miao Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-imx/Makefile | 7 +++---- arch/arm/mach-imx/{head-v7.S => headsmp.S} | 0 2 files changed, 3 insertions(+), 4 deletions(-) rename arch/arm/mach-imx/{head-v7.S => headsmp.S} (100%) diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 1a5280ec1fd02..d272b00c03ef2 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -70,14 +70,13 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o -obj-$(CONFIG_CPU_V7) += head-v7.o -AFLAGS_head-v7.o :=-Wa,-march=armv7-a -obj-$(CONFIG_SMP) += platsmp.o +AFLAGS_headsmp.o :=-Wa,-march=armv7-a +obj-$(CONFIG_SMP) += headsmp.o platsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o ifeq ($(CONFIG_PM),y) -obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o +obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o endif # i.MX5 based machines diff --git a/arch/arm/mach-imx/head-v7.S b/arch/arm/mach-imx/headsmp.S similarity index 100% rename from arch/arm/mach-imx/head-v7.S rename to arch/arm/mach-imx/headsmp.S -- 2.47.2