From patchwork Fri Feb 12 07:11:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 8287911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 27C87BEEE5 for ; Fri, 12 Feb 2016 07:14:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 485CF203B5 for ; Fri, 12 Feb 2016 07:14:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE69D2039E for ; Fri, 12 Feb 2016 07:14:02 +0000 (UTC) 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 1aU7td-0004e0-I2; Fri, 12 Feb 2016 07:12:05 +0000 Received: from smtp6-v.fe.bosch.de ([2a03:cc00:ff0:100::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aU7tZ-0004b9-EO for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2016 07:12:03 +0000 Received: from vsmta13.fe.internet.bosch.com (unknown [10.4.98.53]) by imta23.fe.bosch.de (Postfix) with ESMTP id 34BF21580159 for ; Fri, 12 Feb 2016 08:11:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=de.bosch.com; s=2015-01-21; t=1455261096; bh=NGTXlo7dm+XtLE1hMvqRzED2vavWa/fN0g29+mqOJQo=; l=10; h=From:From:Reply-To:Sender; b=l3knYmz92dkbRO/SacvxBCjCO2nR3qp5YhdT0/2SrKeEw1Aa+cnbqbLCkg5LtGgMQ 85QQV78XPZ0tLHge5yUKcwk5Sko0yT3jJeKH8rnb7lt1luOhj+yiKzA+ppiPNFce/a zoX+x9zJo4IUK9L02jUcbzzXKTe9cdRKMU5qRo5Q= Received: from FE-HUB1001.de.bosch.com (vsgw22.fe.internet.bosch.com [10.4.98.11]) by vsmta13.fe.internet.bosch.com (Postfix) with ESMTP id DEC4E2E403A2 for ; Fri, 12 Feb 2016 08:11:35 +0100 (CET) Received: from hi-z5661.hi.de.bosch.com (10.34.211.2) by FE-HUB1001.de.bosch.com (10.4.103.109) with Microsoft SMTP Server id 14.3.195.1; Fri, 12 Feb 2016 08:11:35 +0100 Received: from hi-z5661.hi.de.bosch.com (localhost [127.0.0.1]) by hi-z5661.hi.de.bosch.com (Postfix) with ESMTP id 148DF415A8; Fri, 12 Feb 2016 08:11:35 +0100 (CET) From: Dirk Behme To: , Subject: [PATCH] ARM: imx: Do L2 errata only if the L2 cache isn't enabled Date: Fri, 12 Feb 2016 08:11:33 +0100 Message-ID: <1455261093-11849-1-git-send-email-dirk.behme@de.bosch.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22124.006 X-TMASE-MatchedRID: tqeja+VfyRLU4D7YCSb+lEhwlOfYeSqx75CEZqo4Fcx/y29NnT7OA/FN etD9U62QGnh+YEOcm53ijpjet3oGSGk5Fql3Faa7ksHaPaQQRsATbU1KYGoQp0bqb+WBsolSo8W MkQWv6iXBcIE78YqRWo6HM5rqDwqt9lHDNeFBZ62KLKxmDIKRbb1cdQftYqBaF1++u+aajENC5D oKAWNEBQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160211_231202_030451_D9C70865 X-CRM114-Status: UNSURE ( 7.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.0 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcel Grosshans , Dirk Behme Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 All the generic L2 cache handling code is encapsulated by a check if the L2 cache is enabled. If it's enabled already, the code is skipped. For the i.MX6 specific L2 cache handling we missed this check. Add it. Signed-off-by: Marcel Grosshans Signed-off-by: Dirk Behme --- arch/arm/mach-imx/system.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index 51c3501..a600bd7 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c @@ -106,6 +106,9 @@ void __init imx_init_l2cache(void) goto out; } + if (readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN) + goto skip_if_enabled; + /* Configure the L2 PREFETCH and POWER registers */ val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL); val |= 0x70800000; @@ -122,6 +125,7 @@ void __init imx_init_l2cache(void) val &= ~(1 << 30 | 1 << 23); writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL); +skip_if_enabled: iounmap(l2x0_base); of_node_put(np);