devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: devicetree@vger.kernel.org, Russell King <linux@arm.linux.org.uk>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: l2x0: add L210 write allocate override flag
Date: Mon, 18 Mar 2019 09:41:49 +0100	[thread overview]
Message-ID: <8f49016c5f94a75bc49cb63180aa42ba@agner.ch> (raw)
In-Reply-To: <20190318083053.24197-1-linus.walleij@linaro.org>

On 18.03.2019 09:30, Linus Walleij wrote:
> This adds support for setting the flag bit "write allocate
> override" to the L210 variant.
> 
> The "write allocate override" bit is used on the Nomadik STn8815
> and is necessary to properly make use of the L210 cache on that
> machine without sporadic crashes.
> 
> After this the platform can boot and run without any out-of-tree
> patches.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  Documentation/devicetree/bindings/arm/l2c2x0.yaml | 5 +++++
>  arch/arm/mm/cache-l2x0.c                          | 8 ++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/l2c2x0.yaml
> b/Documentation/devicetree/bindings/arm/l2c2x0.yaml
> index bfc5c185561c..4cffcda3e2b7 100644
> --- a/Documentation/devicetree/bindings/arm/l2c2x0.yaml
> +++ b/Documentation/devicetree/bindings/arm/l2c2x0.yaml
> @@ -168,6 +168,11 @@ properties:
>        be specified to indicate that such transforms are precluded.
>      type: boolean
>  
> +  arm,write-allocate-override:
> +    description: On 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.

Is type missing here? It is there in the above and below properties...
Not sure though if it's required, I am not very familiar with device
tree yaml schema yet.

--
Stefan

> +
>    arm,parity-enable:
>      description: enable parity checking on the L2 cache (L220 or PL310).
>      type: boolean
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index 808efbb89b88..5cbdb9c18884 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -1078,6 +1078,14 @@ static void __init l2x0_of_parse(const struct
> device_node *np,
>  		val |= L2C_AUX_CTRL_SHARED_OVERRIDE;
>  	}
>  
> +	/* L210-specific aux control flag */
> +	if (of_device_is_compatible(np, "arm,l210-cache")) {
> +		if (of_property_read_bool(np, "arm,write-allocate-override")) {
> +			mask &= ~L210_AUX_CTRL_WA_OVERRIDE;
> +			val |= L210_AUX_CTRL_WA_OVERRIDE;
> +		}
> +	}
> +
>  	ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_256K);
>  	if (ret)
>  		return;

  reply	other threads:[~2019-03-18  8:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18  8:30 [PATCH] ARM: l2x0: add L210 write allocate override flag Linus Walleij
2019-03-18  8:41 ` Stefan Agner [this message]
2019-03-18 14:04 ` Russell King - ARM Linux admin
2019-03-18 22:14   ` Linus Walleij
2019-03-31  6:40     ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f49016c5f94a75bc49cb63180aa42ba@agner.ch \
    --to=stefan@agner.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).