diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-06-05 03:04:56 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-06-13 13:48:26 -0400 |
commit | 3e0a8f239607e6f7608c3e7797e9c304700f5b72 (patch) | |
tree | 48cda386f2913e9aca4279295d3769833586fe6f /arch/arm/mach-mvebu/armada-370-xp.c | |
parent | 865e0527d2d791083a40555f2ba872da5fbddda8 (diff) |
arm: mvebu: move cache and mvebu-mbus initialization later
Current, the L2 cache and the mvebu-mbus drivers are initialized at
->init_early() time. However, at ->init_early() time, ioremap() only
works if a static I/O mapping has already been put in place. If it's
not the case, it tries to do a memory allocation with kmalloc() which
is not possible so early at this stage of the initialization.
Since we want to get rid of the static I/O mapping, we cannot
initialize the L2 cache driver and the mvebu-mbus driver so early. So,
we move their initialization to the ->init_time() level, which is
slightly later (so ioremap() works properly), but sufficiently early
to be before the call of the ->smp_prepare_cpus() hook, which creates
an address decoding window for the BootROM, which requires the
mvebu-mbus driver to be properly initialized.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-mvebu/armada-370-xp.c')
-rw-r--r-- | arch/arm/mach-mvebu/armada-370-xp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index b9319c44d0d2..75ebf567f96c 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c | |||
@@ -44,14 +44,11 @@ static void __init armada_370_xp_map_io(void) | |||
44 | 44 | ||
45 | static void __init armada_370_xp_timer_and_clk_init(void) | 45 | static void __init armada_370_xp_timer_and_clk_init(void) |
46 | { | 46 | { |
47 | char *mbus_soc_name; | ||
48 | |||
47 | mvebu_clocks_init(); | 49 | mvebu_clocks_init(); |
48 | armada_370_xp_timer_init(); | 50 | armada_370_xp_timer_init(); |
49 | coherency_init(); | 51 | coherency_init(); |
50 | } | ||
51 | |||
52 | static void __init armada_370_xp_init_early(void) | ||
53 | { | ||
54 | char *mbus_soc_name; | ||
55 | 52 | ||
56 | /* | 53 | /* |
57 | * This initialization will be replaced by a DT-based | 54 | * This initialization will be replaced by a DT-based |
@@ -87,7 +84,6 @@ DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)") | |||
87 | .smp = smp_ops(armada_xp_smp_ops), | 84 | .smp = smp_ops(armada_xp_smp_ops), |
88 | .init_machine = armada_370_xp_dt_init, | 85 | .init_machine = armada_370_xp_dt_init, |
89 | .map_io = armada_370_xp_map_io, | 86 | .map_io = armada_370_xp_map_io, |
90 | .init_early = armada_370_xp_init_early, | ||
91 | .init_time = armada_370_xp_timer_and_clk_init, | 87 | .init_time = armada_370_xp_timer_and_clk_init, |
92 | .restart = mvebu_restart, | 88 | .restart = mvebu_restart, |
93 | .dt_compat = armada_370_xp_dt_compat, | 89 | .dt_compat = armada_370_xp_dt_compat, |