From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/8] ARM: l2x0: move DT parsing for cache props
Date: Tue, 2 Sep 2014 14:02:31 +0200 [thread overview]
Message-ID: <1409659354-23553-6-git-send-email-linus.walleij@linaro.org> (raw)
In-Reply-To: <1409659354-23553-1-git-send-email-linus.walleij@linaro.org>
The current diagnostic prints in the l2x0 driver will print
warnings like this if the AUX register i modified by the
mask and set words passed to the l2x0_init() function:
L2C: platform modifies aux control register: 0x02020fff -> 0x02730fff
L2C: DT/platform modifies aux control register: 0x02020fff -> 0x02730fff
L2C-220 cache controller enabled, 8 ways, 128 kB
L2C-220: CACHE_ID 0x41000486, AUX_CTRL 0x06730fff
However this is not printed properly if the DT modifies
the AUX register, even if the debug print says so. As the
call to ->of_parse for the cache variant is placed after this
print.
Move the ->of_parse call above the print so we get proper
diagnostics.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arm/mm/cache-l2x0.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 5f2c988a06ac..363c27bee3f6 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -1518,6 +1518,11 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
of_property_read_bool(np, "arm,io-coherent"))
data = &of_l2c310_coherent_data;
+ /* L2 configuration can only be changed if the cache is disabled */
+ if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN))
+ if (data->of_parse)
+ data->of_parse(np, &aux_val, &aux_mask);
+
old_aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
if (old_aux != ((old_aux & aux_mask) | aux_val)) {
pr_warn("L2C: platform modifies aux control register: 0x%08x -> 0x%08x\n",
@@ -1530,11 +1535,6 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
if (!of_property_read_bool(np, "cache-unified"))
pr_err("L2C: device tree omits to specify unified cache\n");
- /* L2 configuration can only be changed if the cache is disabled */
- if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN))
- if (data->of_parse)
- data->of_parse(np, &aux_val, &aux_mask);
-
if (cache_id_part_number_from_dt)
cache_id = cache_id_part_number_from_dt;
else
--
1.9.3
next prev parent reply other threads:[~2014-09-02 12:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 12:02 [PATCH 0/8] ARM RealView DeviceTree support v5 Linus Walleij
2014-09-02 12:02 ` [PATCH 1/8 v2] leds: add a driver for syscon-based LEDs Linus Walleij
2014-09-02 12:02 ` [PATCH 2/8 v2] leds: add device tree bindings for register bit LEDs Linus Walleij
2014-09-02 12:24 ` Arnd Bergmann
2014-09-08 11:25 ` Linus Walleij
2014-09-02 14:22 ` Geert Uytterhoeven
2014-09-08 11:14 ` Linus Walleij
2014-09-02 12:02 ` [PATCH 3/8 v2] power: reset: driver for the Versatile syscon reboot Linus Walleij
2014-09-02 12:32 ` Arnd Bergmann
2014-09-02 12:02 ` [PATCH 4/8] soc: add driver for the ARM RealView Linus Walleij
2014-09-02 12:02 ` Linus Walleij [this message]
2014-09-02 12:43 ` [PATCH 5/8] ARM: l2x0: move DT parsing for cache props Russell King - ARM Linux
2014-09-05 11:10 ` Linus Walleij
2014-09-02 12:02 ` [PATCH 6/8] ARM: l2c: parse 'cache-size' and 'cache-sets' properties Linus Walleij
2014-09-02 12:02 ` [PATCH 7/8] ARM: l2x0: support associativity from DT Linus Walleij
2014-09-02 13:17 ` Russell King - ARM Linux
2014-09-02 12:02 ` [PATCH 8/8 v5] ARM: realview: basic device tree implementation Linus Walleij
2014-09-02 12:37 ` Arnd Bergmann
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=1409659354-23553-6-git-send-email-linus.walleij@linaro.org \
--to=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).