aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/cache-l2x0.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-03-15 12:48:04 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-05-29 19:47:47 -0400
commitc40e7eb6c0b08fbc905ac1bec516e6f59ffd4d02 (patch)
treef20037cb021691737e6a46a8904519745a3d00d2 /arch/arm/mm/cache-l2x0.c
parent9846dfc98f0e3482e3d0df91bea67ead728301ac (diff)
ARM: l2c: move l2c save function to __l2c_init()
There's no reason this functionality should be specific to DT, so move it into the common initialisation function. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/cache-l2x0.c')
-rw-r--r--arch/arm/mm/cache-l2x0.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 08f9cade028a..3b6213838054 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -357,6 +357,13 @@ static void __init __l2c_init(const struct l2c_init_data *data,
357 int way_size_shift = L2X0_WAY_SIZE_SHIFT; 357 int way_size_shift = L2X0_WAY_SIZE_SHIFT;
358 const char *type; 358 const char *type;
359 359
360 /*
361 * It is strange to save the register state before initialisation,
362 * but hey, this is what the DT implementations decided to do.
363 */
364 if (data->save)
365 data->save(l2x0_base);
366
360 aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); 367 aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
361 368
362 aux &= aux_mask; 369 aux &= aux_mask;
@@ -1023,9 +1030,6 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
1023 aurora_broadcast_l2_commands(); 1030 aurora_broadcast_l2_commands();
1024 } 1031 }
1025 1032
1026 if (data->save)
1027 data->save(l2x0_base);
1028
1029 if (cache_id_part_number_from_dt) 1033 if (cache_id_part_number_from_dt)
1030 cache_id = cache_id_part_number_from_dt; 1034 cache_id = cache_id_part_number_from_dt;
1031 else 1035 else