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 16:48:04 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-05-30 00:47:47 +0100
commitc40e7eb6c0b08fbc905ac1bec516e6f59ffd4d02 (patch)
treef20037cb021691737e6a46a8904519745a3d00d2 /arch/arm/mm/cache-l2x0.c
parentARM: l2c: pass iomem address into data->save function (diff)
downloadlinux-dev-c40e7eb6c0b08fbc905ac1bec516e6f59ffd4d02.tar.xz
linux-dev-c40e7eb6c0b08fbc905ac1bec516e6f59ffd4d02.zip
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 '')
-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,
int way_size_shift = L2X0_WAY_SIZE_SHIFT;
const char *type;
+ /*
+ * It is strange to save the register state before initialisation,
+ * but hey, this is what the DT implementations decided to do.
+ */
+ if (data->save)
+ data->save(l2x0_base);
+
aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
aux &= aux_mask;
@@ -1023,9 +1030,6 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
aurora_broadcast_l2_commands();
}
- if (data->save)
- data->save(l2x0_base);
-
if (cache_id_part_number_from_dt)
cache_id = cache_id_part_number_from_dt;
else