From patchwork Fri Jun 13 16:01:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4350281 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0F16C9F3B4 for ; Fri, 13 Jun 2014 16:02:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C6FF20268 for ; Fri, 13 Jun 2014 16:02:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C602A202F0 for ; Fri, 13 Jun 2014 16:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753073AbaFMQCC (ORCPT ); Fri, 13 Jun 2014 12:02:02 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:53405 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbaFMQCB (ORCPT ); Fri, 13 Jun 2014 12:02:01 -0400 Received: from wuerfel.lan (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) id 0MXSRF-1XIMUn0cSL-00WHUL; Fri, 13 Jun 2014 18:01:28 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: arm@kernel.org, Arnd Bergmann , linux-omap@vger.kernel.org, Tony Lindgren Subject: [PATCH 02/14] ARM: omap2: fix am43xx dependency on l2x0 cache Date: Fri, 13 Jun 2014 18:01:04 +0200 Message-Id: <1402675276-538682-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402675276-538682-1-git-send-email-arnd@arndb.de> References: <1402675276-538682-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:Dc7LJgNS+6LBYHk0EweqeuTPzdmRUnvvcLaXsmR1eAy uAmJd+tHPYvwLOOTE8UMKE9pxnRQsEx+Yz9IRsj8Ar3/wHZ2cI z0AxFZu6vypMwfQuL5tyzKzkAW5yByJrWGCDymq4p1tEoSFnx5 r13qCz4Yk1f25q8GoNHDCQFaOAYJX6mlXk7ph6kYbH90396oou BuvrdyzkOjD3ZBe2dAGUPQoBzTEvErGqz30TSEt9QumLVASgkp Uduxzz0xrreb+w3v4ygrH3dmEks8oj/CUaRxRGD/of6ucgM50a vXAsvVDhJPuCc/+QDRQP76MLhEHudLxCDQMhRe20cenVBkttjb miq/luT2l6R4v88LdeL5ypBI8tZ39vG7lH56nCNGb Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit d941f86fad41b ("ARM: l2c: AM43x: add L2 cache support") enabled the L2 cache support for the am43xx SoC, but caused a build regression when the driver for that cache controller is disabled: arch/arm/mach-omap2/built-in.o: In function `am43xx_init_early': :(.init.text+0xb20): undefined reference to `omap_l2_cache_init' This did not happen for OMAP4, which has the same call, but enables the l2x0 driver unconditionally. We could do the same thing for am43xx, but it seems better to allow turning it off and make the code work in either case. This adds an inline wrapper for omap_l2_cache_init for the disabled case, and removes the 'select' from OMAP4 so it becomes a user visible option. Signed-off-by: Arnd Bergmann Cc: linux-omap@vger.kernel.org Cc: Tony Lindgren Acked-by: Tony Lindgren --- arch/arm/configs/omap2plus_defconfig | 1 + arch/arm/mach-omap2/Kconfig | 1 - arch/arm/mach-omap2/common.h | 7 +++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 59066cf..536a137 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -32,6 +32,7 @@ CONFIG_SOC_OMAP5=y CONFIG_SOC_AM33XX=y CONFIG_SOC_AM43XX=y CONFIG_SOC_DRA7XX=y +CONFIG_CACHE_L2X0=y CONFIG_ARM_THUMBEE=y CONFIG_ARM_ERRATA_411920=y CONFIG_SMP=y diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 0ba4826..2085b3d 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -28,7 +28,6 @@ config ARCH_OMAP4 select ARM_CPU_SUSPEND if PM select ARM_ERRATA_720789 select ARM_GIC - select CACHE_L2X0 select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP select OMAP_INTERCONNECT diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index ff02973..a373d50 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -91,7 +91,14 @@ extern void omap3_sync32k_timer_init(void); extern void omap3_secure_sync32k_timer_init(void); extern void omap3_gptimer_timer_init(void); extern void omap4_local_timer_init(void); +#ifdef CONFIG_CACHE_L2X0 int omap_l2_cache_init(void); +#else +static inline int omap_l2_cache_init(void) +{ + return 0; +} +#endif extern void omap5_realtime_timer_init(void); void omap2420_init_early(void);