base-files: define yes/no as valid boolean options
[openwrt.git] / target / linux / mvebu / patches-3.10 / 0026-arm-mvebu-move-cache-and-mvebu-mbus-initialization-l.patch
1 From c7c7e6309ae12f2cb0d9053875876b57bb7587e4 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 5 Jun 2013 09:04:56 +0200
4 Subject: [PATCH 026/203] arm: mvebu: move cache and mvebu-mbus initialization
5  later
6
7 Current, the L2 cache and the mvebu-mbus drivers are initialized at
8 ->init_early() time. However, at ->init_early() time, ioremap() only
9 works if a static I/O mapping has already been put in place. If it's
10 not the case, it tries to do a memory allocation with kmalloc() which
11 is not possible so early at this stage of the initialization.
12
13 Since we want to get rid of the static I/O mapping, we cannot
14 initialize the L2 cache driver and the mvebu-mbus driver so early. So,
15 we move their initialization to the ->init_time() level, which is
16 slightly later (so ioremap() works properly), but sufficiently early
17 to be before the call of the ->smp_prepare_cpus() hook, which creates
18 an address decoding window for the BootROM, which requires the
19 mvebu-mbus driver to be properly initialized.
20
21 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
22 Acked-by: Arnd Bergmann <arnd@arndb.de>
23 Signed-off-by: Jason Cooper <jason@lakedaemon.net>
24 ---
25  arch/arm/mach-mvebu/armada-370-xp.c | 8 ++------
26  1 file changed, 2 insertions(+), 6 deletions(-)
27
28 --- a/arch/arm/mach-mvebu/armada-370-xp.c
29 +++ b/arch/arm/mach-mvebu/armada-370-xp.c
30 @@ -45,14 +45,11 @@ static void __init armada_370_xp_map_io(
31  
32  static void __init armada_370_xp_timer_and_clk_init(void)
33  {
34 +       char *mbus_soc_name;
35 +
36         mvebu_clocks_init();
37         armada_370_xp_timer_init();
38         coherency_init();
39 -}
40 -
41 -static void __init armada_370_xp_init_early(void)
42 -{
43 -       char *mbus_soc_name;
44  
45         /*
46          * This initialization will be replaced by a DT-based
47 @@ -88,7 +85,6 @@ DT_MACHINE_START(ARMADA_XP_DT, "Marvell
48         .smp            = smp_ops(armada_xp_smp_ops),
49         .init_machine   = armada_370_xp_dt_init,
50         .map_io         = armada_370_xp_map_io,
51 -       .init_early     = armada_370_xp_init_early,
52         .init_irq       = irqchip_init,
53         .init_time      = armada_370_xp_timer_and_clk_init,
54         .restart        = mvebu_restart,