Message ID | 1409659354-23553-6-git-send-email-linus.walleij@linaro.org |
---|---|
State | New |
Headers | show |
On Tue, Sep 02, 2014 at 02:02:31PM +0200, Linus Walleij wrote: > 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 Notice that there are two here. The first means that the platform passed values which resulted in an actual modification to the control register. This happens in l2x0_of_init() to identify values of aux_mask/aux_val which result in manipulation of the control register by hard-coded platform values. The second means that the platform _or_ the DT resulted in an actual modification of the control register. This happens in __l2c_init(), after the DT has been parsed, or after the non-DT code paths to identify any remaining modifications. I don't see any point to this patch.
On Tue, Sep 2, 2014 at 2:43 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> I don't see any point to this patch.
Neither do I after looking closer. Hm. I must have been confusing
myself, I'm dropping this crap.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
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
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(-)