]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: l2c: check that DT files specify the required "cache-unified" property
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 17 Mar 2014 12:59:08 +0000 (12:59 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 May 2014 23:48:45 +0000 (00:48 +0100)
This is a required property, and should always be specified.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/cache-l2x0.c

index c5c8a4152825770c61312618faa60e2a82197ecd..790343b2c13bb3e426313b7d115dc73ccbc84bcc 100644 (file)
@@ -1364,6 +1364,10 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
 
        data = of_match_node(l2x0_ids, np)->data;
 
+       /* All L2 caches are unified, so this property should be specified */
+       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)