From patchwork Thu Apr 25 17:28:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2489431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 022D1DF5B1 for ; Thu, 25 Apr 2013 17:38:45 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVQ6b-00060m-JP; Thu, 25 Apr 2013 17:37:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVQ1M-0007LX-Rz; Thu, 25 Apr 2013 17:31:48 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVPyu-00075c-EO for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2013 17:29:30 +0000 Received: from wuerfel.lan (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MWSYU-1TytGO2fak-00XetA; Thu, 25 Apr 2013 19:29:02 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally Date: Thu, 25 Apr 2013 19:28:46 +0200 Message-Id: <1366910944-3033663-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1366910944-3033663-1-git-send-email-arnd@arndb.de> References: <1366910944-3033663-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:s2O3eT//xPUrEjzC6/5AaONoHpUWDAFbOy3yFPU7brN xs38LIYzmMo3x/Tn20ksnbkw8f+8j737PpFnNDNYUSMOOk6IvV 7Wpl2AGXZs/bUwYdx2Q8ZyHGpgRDQmvM7gMDGCcsazU9BGM0zK +DPYmTUJ0DWSim3SmARKCSEDhIsa/KFL5GD5jWfCHsBHWgy6Ni tr51NlG7F1jpi0THNkrXm9hsDiGp3jdqBcMG/oNwkEzOf8z36p nyVWVxhcR12Hj7eUePkImg3cd4QPjUJXtq6jl+XmMiIbxN/geD yJtdV+6pZEZmIoH2Zp8UXaGqbIKwXo+bL5Dl35c8J6/JFqegGH GfnotF+DceD18X17j8moMAjRYCkVPbJF9L9rEPk1F X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130425_132916_794525_003C2D62 X-CRM114-Status: GOOD ( 11.80 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.171 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Simon Horman , Kuninori Morimoto , Bastian Hecht , linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The irqchip_init function is only available when building with CONFIG_OF enabled, which causes this build failure for bonito_defconfig: arch/arm/mach-shmobile/built-in.o: In function `r8a7740_init_irq_of': :(.init.text+0x580): undefined reference to `irqchip_init' This makes both the OF and the ATAGS portion of the driver conditional, which avoids the build error and also results in smaller object code if not both are enabled, without the need for an #ifdef. Signed-off-by: Arnd Bergmann Cc: Bastian Hecht Cc: Simon Horman Cc: Kuninori Morimoto --- arch/arm/mach-shmobile/intc-r8a7740.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c index 8871f77..5dc57f1 100644 --- a/arch/arm/mach-shmobile/intc-r8a7740.c +++ b/arch/arm/mach-shmobile/intc-r8a7740.c @@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void) void __init r8a7740_init_irq_of(void) { + if (!IS_ENABLED(CONFIG_OF)) + return; + irqchip_init(); r8a7740_init_irq_common(); } void __init r8a7740_init_irq(void) { - void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000); - void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000); + void __iomem *gic_dist_base; + void __iomem *gic_cpu_base; + + if (!IS_ENABLED(CONFIG_ATAGS)) + return; + + gic_dist_base = ioremap_nocache(0xc2800000, 0x1000); + gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000); /* initialize the Generic Interrupt Controller PL390 r0p0 */ gic_init(0, 29, gic_dist_base, gic_cpu_base);