ARM: imx6q: build pm code only when CONFIG_PM selected
authorEric Miao <eric.miao@linaro.org>
Wed, 21 Dec 2011 14:38:23 +0000 (22:38 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 26 Dec 2011 02:18:56 +0000 (10:18 +0800)
Signed-off-by: Eric Miao <eric.miao@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/head-v7.S
arch/arm/plat-mxc/include/mach/common.h

index c44aa974e79c473d123631236269bdb8c2daa8a3..0929768573ba621bc4a41e82bdfc38517479f097 100644 (file)
@@ -595,6 +595,7 @@ comment "i.MX6 family:"
 
 config SOC_IMX6Q
        bool "i.MX6 Quad support"
+       select ARM_CPU_SUSPEND if PM
        select ARM_GIC
        select CACHE_L2X0
        select CPU_V7
index aba73214c2a8cd640e0f4371caf4ce99ac53dc0f..7a739bb5915ee7b0117863b1fe5ecc548734775a 100644 (file)
@@ -70,4 +70,8 @@ AFLAGS_head-v7.o :=-Wa,-march=armv7-a
 obj-$(CONFIG_SMP) += platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
 obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o
-obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o pm-imx6q.o
+obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o
+
+ifeq ($(CONFIG_PM),y)
+obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o
+endif
index 6229efbc70cbcb15d99c8d727db7c638282ea625..a59cae747af40706d7eb038f812f22a592b2eb35 100644 (file)
@@ -71,6 +71,7 @@ ENTRY(v7_secondary_startup)
 ENDPROC(v7_secondary_startup)
 #endif
 
+#ifdef CONFIG_PM
 /*
  * The following code is located into the .data section.  This is to
  * allow phys_l2x0_saved_regs to be accessed with a relative load
@@ -97,3 +98,4 @@ ENDPROC(v7_cpu_resume)
        .globl  phys_l2x0_saved_regs
 phys_l2x0_saved_regs:
         .long   0
+#endif
index c75f254abd857c07e6f8133716b51d5925f17581..f4ebdb817abf3bb4d00019787f0ff5b2bc15a979 100644 (file)
@@ -131,6 +131,12 @@ extern void imx53_evk_common_init(void);
 extern void imx53_qsb_common_init(void);
 extern void imx53_smd_common_init(void);
 extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode);
-extern void imx6q_pm_init(void);
 extern void imx6q_clock_map_io(void);
+
+#ifdef CONFIG_PM
+extern void imx6q_pm_init(void);
+#else
+static inline void imx6q_pm_init(void) {}
+#endif
+
 #endif
This page took 0.029312 seconds and 5 git commands to generate.