From patchwork Tue Mar 15 12:11:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 63866 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp622063lbc; Tue, 15 Mar 2016 05:11:32 -0700 (PDT) X-Received: by 10.98.34.205 with SMTP id p74mr37980962pfj.93.1458043891979; Tue, 15 Mar 2016 05:11:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si1291049pfb.158.2016.03.15.05.11.31; Tue, 15 Mar 2016 05:11:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934667AbcCOMLa (ORCPT + 7 others); Tue, 15 Mar 2016 08:11:30 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:35456 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932688AbcCOML3 (ORCPT ); Tue, 15 Mar 2016 08:11:29 -0400 Received: by mail-lb0-f178.google.com with SMTP id bc4so19734096lbc.2 for ; Tue, 15 Mar 2016 05:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=QDsADRvKXVnCakMoMojGZO71COINc7MJUuEtXBgqo7k=; b=Vw0wu9ExqFAqIhqo9fsILL7hqEAot/aIO982oHjyoiOZspzc5DGDnH9pxgbXSP8RZy J7qxaR240uWrZPnZxd2SF/HmJn6j5+Pnx76e2XApVD5jtUJxqkNvEahhtzJhtTBtUS2f 31riwVJHPcaJOb1gD579JdYRG8dDamzAzk4Yc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QDsADRvKXVnCakMoMojGZO71COINc7MJUuEtXBgqo7k=; b=hkCgfXRSmCnwX/6zDQQrNlzTRPbknxhtx/pBbGrYmvXQJ/t43Ma8V0IITGtbBbnUA2 UQuGZxWWIrpgn4ERs3dB4LW+/MluEk2IwKRmsfScdJtOU/jxMtyshWjHhWZVn7FdKerb 4AgkAcXXKZrbc/+eagiZCKPbbNhWZ8XeiDkLBjaMBFeh3G9aXIZOBotXA9FUwoZdGd/0 mgjwf2Wbl/BsbQ5gaiaMMD183tDtxKKmdfPkuKl5k4NumCHRbFyscdp4PqOVm6Fm66cx SRk8//b5J1ZTZMZYfBIXy5ja/gxSpVzN0NuZtzAvCcKdeEVrDnzu3gq5rA5viQX80Oo3 Imog== X-Gm-Message-State: AD7BkJIcRJVbWCXXg0I2IK2GhYLEP0uzgDmQ6GvYE+dYQSBRmT3HCBkunJsMGFO9hlQBWUDi X-Received: by 10.25.166.140 with SMTP id p134mr8006692lfe.29.1458043888037; Tue, 15 Mar 2016 05:11:28 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-927b71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.123.146]) by smtp.gmail.com with ESMTPSA id l5sm4172233lfd.22.2016.03.15.05.11.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Mar 2016 05:11:27 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Rob Herring Cc: Linus Walleij , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King Subject: [PATCH RESEND] ARM: l2x0: add three special L210 aux control flags Date: Tue, 15 Mar 2016 13:11:22 +0100 Message-Id: <1458043882-16881-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds support for setting the flag bits "wrap access disable", "write allocate override" and "exclusive abort disable" to the L210 variant from the device tree. The "write allocate override" bit was used on the Nomadik and necessary to properly make use of the L210 cache on that machine without sporadic crashes. I took this oppportunity to add all three flags so we avoid excess patching for each one. Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Cc: Russell King Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- Documentation/devicetree/bindings/arm/l2c2x0.txt | 10 ++++++++++ arch/arm/mm/cache-l2x0.c | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Rob Herring diff --git a/Documentation/devicetree/bindings/arm/l2c2x0.txt b/Documentation/devicetree/bindings/arm/l2c2x0.txt index fe0398c5c77b..975d1ae304d4 100644 --- a/Documentation/devicetree/bindings/arm/l2c2x0.txt +++ b/Documentation/devicetree/bindings/arm/l2c2x0.txt @@ -74,6 +74,16 @@ Optional properties: or "write through no write allocate" (for writes). On systems where this may cause DMA buffer corruption, this property must be specified to indicate that such transforms are precluded. +- arm,wrap-access-disable : (L210 only) if this flag is set, wrap accesses + requested on slave ports are converted to linear acesses on master ports. +- arm,write-allocate-override : (L210 only) normally the L210 will use HPROT + attributes, setting this bit overrides that behaviour and cause the cache + to make all write-through and write-back accesses into read-write-allocate + accesses. +- arm,exclusive-abort-disable : (L210 only) normally the cache controller sends + an ERROR response back to exclusive access in a cacheable, shared memory + region with the shared override bit set, but setting this flag disables the + abort generation and the access is instead treated as cacheable, non-shared. - arm,parity-enable : enable parity checking on the L2 cache (L220 or PL310). - arm,parity-disable : disable parity checking on the L2 cache (L220 or PL310). - arm,outer-sync-disable : disable the outer sync operation on the L2 cache. diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 9f9d54271aad..301c3c2dc09f 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -1076,6 +1076,24 @@ static void __init l2x0_of_parse(const struct device_node *np, val |= L2C_AUX_CTRL_SHARED_OVERRIDE; } + /* L210-specific aux control flags */ + if (of_device_is_compatible(np, "arm,l210-cache")) { + if (of_property_read_bool(np, "arm,wrap-access-disable")) { + mask &= ~L210_AUX_CTRL_WRAP_DISABLE; + val |= L210_AUX_CTRL_WRAP_DISABLE; + } + + if (of_property_read_bool(np, "arm,write-allocate-override")) { + mask &= ~L210_AUX_CTRL_WA_OVERRIDE; + val |= L210_AUX_CTRL_WA_OVERRIDE; + } + + if (of_property_read_bool(np, "arm,exclusive-abort-disable")) { + mask &= ~L210_AUX_CTRL_EXCLUSIVE_ABORT; + val |= L210_AUX_CTRL_EXCLUSIVE_ABORT; + } + } + ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_256K); if (ret) return;