aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/arm/cpus.txt2
-rw-r--r--arch/arm/mach-mvebu/Kconfig4
-rw-r--r--arch/arm/mach-mvebu/Makefile2
-rw-r--r--arch/arm/mach-mvebu/headsmp-a9.S22
-rw-r--r--arch/arm/mach-mvebu/platsmp-a9.c68
5 files changed, 97 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index 0dc59c36ad63..4bbcf4fb7583 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -185,6 +185,8 @@ nodes to be present and contain the properties described below.
185 "qcom,gcc-msm8660" 185 "qcom,gcc-msm8660"
186 "qcom,kpss-acc-v1" 186 "qcom,kpss-acc-v1"
187 "qcom,kpss-acc-v2" 187 "qcom,kpss-acc-v2"
188 "marvell,armada-375-smp"
189 "marvell,armada-380-smp"
188 "marvell,armada-xp-smp" 190 "marvell,armada-xp-smp"
189 191
190 - cpu-release-addr 192 - cpu-release-addr
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 736bd2cbc1f0..7bb92b1a63fc 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -41,6 +41,8 @@ config MACH_ARMADA_375
41 select ARMADA_375_CLK 41 select ARMADA_375_CLK
42 select CPU_V7 42 select CPU_V7
43 select HAVE_ARM_SCU 43 select HAVE_ARM_SCU
44 select HAVE_ARM_TWD
45 select HAVE_SMP
44 select MACH_MVEBU_V7 46 select MACH_MVEBU_V7
45 select PINCTRL_ARMADA_375 47 select PINCTRL_ARMADA_375
46 help 48 help
@@ -55,6 +57,8 @@ config MACH_ARMADA_38X
55 select ARMADA_38X_CLK 57 select ARMADA_38X_CLK
56 select CPU_V7 58 select CPU_V7
57 select HAVE_ARM_SCU 59 select HAVE_ARM_SCU
60 select HAVE_ARM_TWD
61 select HAVE_SMP
58 select MACH_MVEBU_V7 62 select MACH_MVEBU_V7
59 select PINCTRL_ARMADA_38X 63 select PINCTRL_ARMADA_38X
60 help 64 help
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index f9cfab05c5f9..02b5389f05fd 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -7,7 +7,7 @@ obj-y += system-controller.o mvebu-soc-id.o cpu-reset.o
7obj-$(CONFIG_MACH_MVEBU_V7) += board-v7.o 7obj-$(CONFIG_MACH_MVEBU_V7) += board-v7.o
8obj-$(CONFIG_MACH_DOVE) += dove.o 8obj-$(CONFIG_MACH_DOVE) += dove.o
9obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o 9obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o
10obj-$(CONFIG_SMP) += platsmp.o headsmp.o 10obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o
11obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 11obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
12obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o 12obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
13obj-$(CONFIG_MACH_T5325) += board-t5325.o 13obj-$(CONFIG_MACH_T5325) += board-t5325.o
diff --git a/arch/arm/mach-mvebu/headsmp-a9.S b/arch/arm/mach-mvebu/headsmp-a9.S
new file mode 100644
index 000000000000..78e66c96e718
--- /dev/null
+++ b/arch/arm/mach-mvebu/headsmp-a9.S
@@ -0,0 +1,22 @@
1/*
2 * SMP support: Entry point for secondary CPUs of Marvell EBU
3 * Cortex-A9 based SOCs (Armada 375 and Armada 38x).
4 *
5 * Copyright (C) 2014 Marvell
6 *
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#include <linux/linkage.h>
16#include <linux/init.h>
17
18 __CPUINIT
19ENTRY(mvebu_cortex_a9_secondary_startup)
20 bl v7_invalidate_l1
21 b secondary_startup
22ENDPROC(mvebu_cortex_a9_secondary_startup)
diff --git a/arch/arm/mach-mvebu/platsmp-a9.c b/arch/arm/mach-mvebu/platsmp-a9.c
new file mode 100644
index 000000000000..27dacfc7fe98
--- /dev/null
+++ b/arch/arm/mach-mvebu/platsmp-a9.c
@@ -0,0 +1,68 @@
1/*
2 * Symmetric Multi Processing (SMP) support for Marvell EBU Cortex-A9
3 * based SOCs (Armada 375/38x).
4 *
5 * Copyright (C) 2014 Marvell
6 *
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#include <linux/init.h>
16#include <linux/io.h>
17#include <linux/of.h>
18#include <linux/smp.h>
19#include <asm/smp_scu.h>
20#include <asm/smp_plat.h>
21#include "common.h"
22#include "pmsu.h"
23
24extern void mvebu_cortex_a9_secondary_startup(void);
25
26static int __cpuinit mvebu_cortex_a9_boot_secondary(unsigned int cpu,
27 struct task_struct *idle)
28{
29 int ret, hw_cpu;
30
31 pr_info("Booting CPU %d\n", cpu);
32
33 /*
34 * Write the address of secondary startup into the system-wide
35 * flags register. The boot monitor waits until it receives a
36 * soft interrupt, and then the secondary CPU branches to this
37 * address.
38 */
39 hw_cpu = cpu_logical_map(cpu);
40
41 if (of_machine_is_compatible("marvell,armada375"))
42 mvebu_system_controller_set_cpu_boot_addr(mvebu_cortex_a9_secondary_startup);
43 else
44 mvebu_pmsu_set_cpu_boot_addr(hw_cpu,
45 mvebu_cortex_a9_secondary_startup);
46
47 smp_wmb();
48 ret = mvebu_cpu_reset_deassert(hw_cpu);
49 if (ret) {
50 pr_err("Could not start the secondary CPU: %d\n", ret);
51 return ret;
52 }
53 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
54
55 return 0;
56}
57
58static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = {
59 .smp_boot_secondary = mvebu_cortex_a9_boot_secondary,
60#ifdef CONFIG_HOTPLUG_CPU
61 .cpu_die = armada_xp_cpu_die,
62#endif
63};
64
65CPU_METHOD_OF_DECLARE(mvebu_armada_375_smp, "marvell,armada-375-smp",
66 &mvebu_cortex_a9_smp_ops);
67CPU_METHOD_OF_DECLARE(mvebu_armada_380_smp, "marvell,armada-380-smp",
68 &mvebu_cortex_a9_smp_ops);