aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mxc.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-07-03 10:22:54 -0400
committerShawn Guo <shawn.guo@freescale.com>2014-07-18 04:11:36 -0400
commita82eb09f4abef12550633da34233b071851fd0ff (patch)
tree9345acc140def978262159d348b39c3aea365d11 /arch/arm/mach-imx/mxc.h
parent918fb15d70f9749de3e37c0e4c606ed0adb0f63f (diff)
ARM: imx: build cpu_is_imx6sl function conditionally
imx6q_pm_enter calls imx6sl_set_wait_clk when run on an imx6sl based machine. However if support for imx6sl is not enabled at compile time, this prevents us from building the kernel and we get this link error instead: arch/arm/mach-imx/built-in.o: In function `imx6q_pm_enter': :(.text+0x4b84): undefined reference to `imx6sl_set_wait_clk' This makes the cpu_is_imx6sl function conditionally return false if imx6sl is disabled at compile-time, which matches what the older cpu_is_mx* macros did. We have similar inline functions for the other imx6 variants, but so far I have not run into a case where the extra #ifdef is necessary. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx/mxc.h')
-rw-r--r--arch/arm/mach-imx/mxc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h
index 75d6a37e1ae4..a39b69ef4301 100644
--- a/arch/arm/mach-imx/mxc.h
+++ b/arch/arm/mach-imx/mxc.h
@@ -154,10 +154,17 @@ extern unsigned int __mxc_cpu_type;
154#endif 154#endif
155 155
156#ifndef __ASSEMBLY__ 156#ifndef __ASSEMBLY__
157#ifdef CONFIG_SOC_IMX6SL
157static inline bool cpu_is_imx6sl(void) 158static inline bool cpu_is_imx6sl(void)
158{ 159{
159 return __mxc_cpu_type == MXC_CPU_IMX6SL; 160 return __mxc_cpu_type == MXC_CPU_IMX6SL;
160} 161}
162#else
163static inline bool cpu_is_imx6sl(void)
164{
165 return false;
166}
167#endif
161 168
162static inline bool cpu_is_imx6dl(void) 169static inline bool cpu_is_imx6dl(void)
163{ 170{