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: "Behme Dirk (CM/ESO2)" X-Patchwork-Id: 582103 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-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AB5B8140BF8 for ; Fri, 12 Feb 2016 18:14:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=de.bosch.com header.i=@de.bosch.com header.b=l3knYmz9; dkim-atps=neutral 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-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-7.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [2a03:cc00:ff0:100:0:0:0:2 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list 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+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org 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);