ARM: l2c: sti: convert to generic l2c OF initialisation
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 28 Apr 2014 14:49:48 +0000 (15:49 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 May 2014 23:50:08 +0000 (00:50 +0100)
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  We can remove the .init_machine as it becomes
the same as the generic version.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-sti/board-dt.c

index dc8669e..910e978 100644 (file)
 
 #include "smp.h"
 
-void __init stih41x_l2x0_init(void)
-{
-       u32 way_size = 0x4;
-       u32 aux_ctrl;
-       /* may be this can be encoded in macros like BIT*() */
-       aux_ctrl = L2C_AUX_CTRL_SHARED_OVERRIDE |
-                  L310_AUX_CTRL_DATA_PREFETCH |
-                  L310_AUX_CTRL_INSTR_PREFETCH |
-                  L2C_AUX_CTRL_WAY_SIZE(way_size);
-
-       l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
-}
-
-static void __init stih41x_machine_init(void)
-{
-       stih41x_l2x0_init();
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
 static const char *stih41x_dt_match[] __initdata = {
        "st,stih415",
        "st,stih416",
@@ -40,7 +21,11 @@ static const char *stih41x_dt_match[] __initdata = {
 };
 
 DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree")
-       .init_machine   = stih41x_machine_init,
-       .smp            = smp_ops(sti_smp_ops),
        .dt_compat      = stih41x_dt_match,
+       .l2c_aux_val    = L2C_AUX_CTRL_SHARED_OVERRIDE |
+                         L310_AUX_CTRL_DATA_PREFETCH |
+                         L310_AUX_CTRL_INSTR_PREFETCH |
+                         L2C_AUX_CTRL_WAY_SIZE(4),
+       .l2c_aux_mask   = 0xc0000fff,
+       .smp            = smp_ops(sti_smp_ops),
 MACHINE_END