diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-03-21 12:59:15 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-04-15 10:06:16 -0400 |
commit | 87e1bed4067e33a4636bffc03689ffb045d586d6 (patch) | |
tree | dbc92ffcfd5e90fbdce15689cf0f6113a05d7e24 /arch/arm/mach-mvebu/armada-370-xp.c | |
parent | a33dc586c90ef8eee273280782b43b40cd43ad7e (diff) |
arm: mach-mvebu: convert to use mvebu-mbus driver
The changes needed to migrate the mach-mvebu (Armada 370 and Armada
XP) to the mvebu-mbus driver are fairly minimal, since not many
devices currently supported on those SoCs use address decoding
windows. The only one being the BootROM window, used to bring up
secondary CPUs.
However, this BootROM window needed for SMP brings an important
requirement: the mvebu-mbus driver must be initialized at the
->early_init() time, otherwise the BootROM window cannot be setup
early enough to be ready before the secondary CPUs are started.
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 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index a5ea616d6d12..12d3655830d1 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/time-armada-370-xp.h> | 19 | #include <linux/time-armada-370-xp.h> |
20 | #include <linux/clk/mvebu.h> | 20 | #include <linux/clk/mvebu.h> |
21 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
22 | #include <linux/mbus.h> | ||
22 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
23 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
24 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
@@ -48,12 +49,29 @@ void __init armada_370_xp_timer_and_clk_init(void) | |||
48 | 49 | ||
49 | void __init armada_370_xp_init_early(void) | 50 | void __init armada_370_xp_init_early(void) |
50 | { | 51 | { |
52 | char *mbus_soc_name; | ||
53 | |||
51 | /* | 54 | /* |
52 | * Some Armada 370/XP devices allocate their coherent buffers | 55 | * Some Armada 370/XP devices allocate their coherent buffers |
53 | * from atomic context. Increase size of atomic coherent pool | 56 | * from atomic context. Increase size of atomic coherent pool |
54 | * to make sure such the allocations won't fail. | 57 | * to make sure such the allocations won't fail. |
55 | */ | 58 | */ |
56 | init_dma_coherent_pool_size(SZ_1M); | 59 | init_dma_coherent_pool_size(SZ_1M); |
60 | |||
61 | /* | ||
62 | * This initialization will be replaced by a DT-based | ||
63 | * initialization once the mvebu-mbus driver gains DT support. | ||
64 | */ | ||
65 | if (of_machine_is_compatible("marvell,armada370")) | ||
66 | mbus_soc_name = "marvell,armada370-mbus"; | ||
67 | else | ||
68 | mbus_soc_name = "marvell,armadaxp-mbus"; | ||
69 | |||
70 | mvebu_mbus_init(mbus_soc_name, | ||
71 | ARMADA_370_XP_MBUS_WINS_BASE, | ||
72 | ARMADA_370_XP_MBUS_WINS_SIZE, | ||
73 | ARMADA_370_XP_SDRAM_WINS_BASE, | ||
74 | ARMADA_370_XP_SDRAM_WINS_SIZE); | ||
57 | } | 75 | } |
58 | 76 | ||
59 | static void __init armada_370_xp_dt_init(void) | 77 | static void __init armada_370_xp_dt_init(void) |