From patchwork Thu Nov 22 00:11:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 10693309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A01855A4 for ; Thu, 22 Nov 2018 00:13:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85D9C2C82C for ; Thu, 22 Nov 2018 00:13:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 702342C83D; Thu, 22 Nov 2018 00:13:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 41DFE2C7EF for ; Thu, 22 Nov 2018 00:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZAILcUr7P5EOOg0kU/7k03Gb9CLbmRaft1dPRbTKLA8=; b=IhJH6xANieWWfE CQ7upSrT6swLqcfbqrFzuXwT739dxPlKK0vGjnH37ZW1EfXl3CrbsDmWEsWvd+w4s9/iBszdjrAU5 /8IrJ0HvAsIXEEZupJwgBmu48YeNkr2okTLeozLLPTEVXRu3RbykiS4T2klvuvkP7XaEN2PwXgpnI vGVJRW8JArywq10yCu0pHx4BGmtIeSVfCtSYu54xDH7XmF0mF6LdzkxMbaTSSiY3xxOGhhltz1PAo a3l1i179GXNTZv/tYYmHezNHYdFzJj5NKAC+CPlAftdDnjSQvRjRkhERwfx1pUntazGz8z4oY3Bey NcVIOQ9xfwZ89jYL9umw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPccA-0001cs-GZ; Thu, 22 Nov 2018 00:13:02 +0000 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPcbu-0001aI-6I for linux-arm-kernel@lists.infradead.org; Thu, 22 Nov 2018 00:12:48 +0000 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 1D590886D4; Thu, 22 Nov 2018 13:12:06 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1542845526; bh=wjn4CFcNHOU1ZpPZPs2FpspHxrTRiloMOnyTBSb9ilA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gf3ejZgv+K7aFikj0OXrEwSYPgJGQH5mcgRwZ47rTCJo/KnkRRyZqamC5K42+XO8b AQ77kwywCm97jvR3QsKJXV8e0pKLBse+jnb3f1hUq03U95aHhKZYlapsWul030k33y bg/TifXK1xpq/kXnLiClW5gh9OtWTry5g+y2b4UJjkrRS2eUnA36dha+BpfoaljMY6 WdFyaKcpR7iVh1Jn1QIKHca/Say9iYtcaASzzckNV+263juK+BHbbCdESJy5xTqBXx 0d69c2LioT6doGtBtidh9VLsozd4G1EPIh1fI4XbB1fSzq2YhntACHnGSdTw6+fZPC zUy9/DPQDAZIg== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7, 5, 8, 10121) id ; Thu, 22 Nov 2018 13:12:05 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by smtp (Postfix) with ESMTP id 29ECA13EEFE; Thu, 22 Nov 2018 13:12:08 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id B63BD1E08D9; Thu, 22 Nov 2018 13:12:02 +1300 (NZDT) From: Chris Packham To: linux@armlinux.org.uk, bp@alien8.de, arnd@arndb.de, jlu@pengutronix.de, gregory.clement@bootlin.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 6/9] ARM: l2x0: add marvell,ecc-enable property for aurora Date: Thu, 22 Nov 2018 13:11:39 +1300 Message-Id: <20181122001142.19187-7-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122001142.19187-1-chris.packham@alliedtelesis.co.nz> References: <20181122001142.19187-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 x-atlnz-ls: pat X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181121_161246_411952_503A8E3D X-CRM114-Status: GOOD ( 10.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Chris Packham , linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The aurora cache on the Marvell Armada-XP SoC supports ECC protection for the L2 data arrays. Add a "marvell,ecc-enable" device tree property which can be used to enable this. Signed-off-by: Chris Packham [jlu@pengutronix.de: use aurora specific define AURORA_ACR_ECC_EN] Signed-off-by: Jan Luebbe --- Notes: Changes in v7: - remove marvell,ecc-disable arch/arm/mm/cache-l2x0.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index b70bee74750d..e5380f7b14a5 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -1505,6 +1505,11 @@ static void __init aurora_of_parse(const struct device_node *np, mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK; } + if (of_property_read_bool(np, "marvell,ecc-enable")) { + mask |= AURORA_ACR_ECC_EN; + val |= AURORA_ACR_ECC_EN; + } + if (of_property_read_bool(np, "arm,parity-enable")) { mask |= AURORA_ACR_PARITY_EN; val |= AURORA_ACR_PARITY_EN;