diff options
Diffstat (limited to 'arch/arm/mach-mvebu/platsmp.c')
-rw-r--r-- | arch/arm/mach-mvebu/platsmp.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index ce81d3031405..c6b00fce6d8d 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
24 | #include <linux/of_address.h> | ||
24 | #include <linux/mbus.h> | 25 | #include <linux/mbus.h> |
25 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
26 | #include <asm/smp_plat.h> | 27 | #include <asm/smp_plat.h> |
@@ -29,6 +30,9 @@ | |||
29 | #include "pmsu.h" | 30 | #include "pmsu.h" |
30 | #include "coherency.h" | 31 | #include "coherency.h" |
31 | 32 | ||
33 | #define AXP_BOOTROM_BASE 0xfff00000 | ||
34 | #define AXP_BOOTROM_SIZE 0x100000 | ||
35 | |||
32 | void __init set_secondary_cpus_clock(void) | 36 | void __init set_secondary_cpus_clock(void) |
33 | { | 37 | { |
34 | int thiscpu; | 38 | int thiscpu; |
@@ -114,10 +118,29 @@ static void __init armada_xp_smp_init_cpus(void) | |||
114 | 118 | ||
115 | void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) | 119 | void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) |
116 | { | 120 | { |
121 | struct device_node *node; | ||
122 | struct resource res; | ||
123 | int err; | ||
124 | |||
117 | set_secondary_cpus_clock(); | 125 | set_secondary_cpus_clock(); |
118 | flush_cache_all(); | 126 | flush_cache_all(); |
119 | set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); | 127 | set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); |
120 | mvebu_mbus_add_window("bootrom", 0xfff00000, SZ_1M); | 128 | |
129 | /* | ||
130 | * In order to boot the secondary CPUs we need to ensure | ||
131 | * the bootROM is mapped at the correct address. | ||
132 | */ | ||
133 | node = of_find_compatible_node(NULL, NULL, "marvell,bootrom"); | ||
134 | if (!node) | ||
135 | panic("Cannot find 'marvell,bootrom' compatible node"); | ||
136 | |||
137 | err = of_address_to_resource(node, 0, &res); | ||
138 | if (err < 0) | ||
139 | panic("Cannot get 'bootrom' node address"); | ||
140 | |||
141 | if (res.start != AXP_BOOTROM_BASE || | ||
142 | resource_size(&res) != AXP_BOOTROM_SIZE) | ||
143 | panic("The address for the BootROM is incorrect"); | ||
121 | } | 144 | } |
122 | 145 | ||
123 | struct smp_operations armada_xp_smp_ops __initdata = { | 146 | struct smp_operations armada_xp_smp_ops __initdata = { |