Merge branch 'x86/boot' into x86/urgent
[firefly-linux-kernel-4.4.55.git] / arch / arm / mm / cache-l2x0.c
index 8f15f70622a6aa30a9ff7f20fb6cea3a963fc53b..e309c8f35af5af61e1d267bc212d7e4f08fbd786 100644 (file)
@@ -1647,6 +1647,7 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
        struct device_node *np;
        struct resource res;
        u32 cache_id, old_aux;
+       u32 cache_level = 2;
 
        np = of_find_matching_node(NULL, l2x0_ids);
        if (!np)
@@ -1679,6 +1680,12 @@ 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");
 
+       if (of_property_read_u32(np, "cache-level", &cache_level))
+               pr_err("L2C: device tree omits to specify cache-level\n");
+
+       if (cache_level != 2)
+               pr_err("L2C: device tree specifies invalid cache level\n");
+
        /* Read back current (default) hardware configuration */
        if (data->save)
                data->save(l2x0_base);