From patchwork Thu Jul 3 14:22:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 366875 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B181C140131 for ; Fri, 4 Jul 2014 00:31:06 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X2i05-0004AV-9J; Thu, 03 Jul 2014 14:28:37 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X2huw-0000t9-2A for linux-arm-kernel@lists.infradead.org; Thu, 03 Jul 2014 14:23:18 +0000 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue001) with ESMTP (Nemesis) id 0M7Pmh-1Wfxl20OQh-00xNJN; Thu, 03 Jul 2014 16:22:55 +0200 From: Arnd Bergmann To: shawn.guo@freescale.com Subject: [PATCH] ARM: imx: build cpu_is_imx6sl function conditionally Date: Thu, 03 Jul 2014 16:22:54 +0200 Message-ID: <4295402.oOSEcbAj2f@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:uXjEtPhvdLmqcze2HarOXfK24VJ8rD/5ndnM1D/y12l LNmfQtSr53qNCP5q6Qt0W3GHm1bV6p451NYNmB0FRatCyYSU2q wl2pvH66hTTq9OSZr0/vVyCjCHNv8CAP7LWZx00SzXDOvqUM59 lPkI+xMHhdPWQMx3P6HDTYiclCs4DFgMm5rcvyQisp16PBemI3 TwTb3hsrQSRTuNVgQQbUD5mTuMOiU/4RD3oNLo1OtFbTTSjDTU RA1U4rcYSeoV470WV0UvYE/nB43MY2numULEmbRx7ZP2WITSU/ 9LNsmNz/23YSj+RkLCJDnQ1/w3zQuq1kdUEb8j55cBa7s+sg+x BOncg4Beo6bIPSUQcmkg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140703_072318_450858_467B1385 X-CRM114-Status: GOOD ( 10.74 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.131 listed in list.dnswl.org] -2.3 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.131 listed in wl.mailspike.net] Cc: s.hauer@pengutronix.de, Anson Huang , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org 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 diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h index 75d6a37..b03b808 100644 --- a/arch/arm/mach-imx/mxc.h +++ b/arch/arm/mach-imx/mxc.h @@ -156,7 +156,11 @@ extern unsigned int __mxc_cpu_type; #ifndef __ASSEMBLY__ static inline bool cpu_is_imx6sl(void) { +#ifdef CONFIG_SOC_IMX6SL return __mxc_cpu_type == MXC_CPU_IMX6SL; +#else + return 0; +#endif } static inline bool cpu_is_imx6dl(void)