aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/platsmp.c
diff options
context:
space:
mode:
authorJingchang Lu <b35083@freescale.com>2014-10-31 05:01:13 -0400
committerShawn Guo <shawn.guo@linaro.org>2014-11-23 01:56:21 -0500
commit4e3fea4a950e3ec22ec8f99a7438aa5ba584263a (patch)
treec460e261dcc12181346e0582621bbb6e0b69df3d /arch/arm/mach-imx/platsmp.c
parent7f0fb6104b3a9c48d7b253d3984d3a619bb1e654 (diff)
ARM: imx: Add Freescale LS1021A SMP support
Freescale LS1021A SoCs deploy two cortex-A7 processors, this adds bring-up support for the secondary core. Signed-off-by: Jingchang Lu <b35083@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/platsmp.c')
-rw-r--r--arch/arm/mach-imx/platsmp.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index 771bd25c1025..7f270015fe58 100644
--- a/arch/arm/mach-imx/platsmp.c
+++ b/arch/arm/mach-imx/platsmp.c
@@ -11,7 +11,10 @@
11 */ 11 */
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/of_address.h>
15#include <linux/of.h>
14#include <linux/smp.h> 16#include <linux/smp.h>
17
15#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
16#include <asm/page.h> 19#include <asm/page.h>
17#include <asm/smp_scu.h> 20#include <asm/smp_scu.h>
@@ -94,3 +97,33 @@ struct smp_operations imx_smp_ops __initdata = {
94 .cpu_kill = imx_cpu_kill, 97 .cpu_kill = imx_cpu_kill,
95#endif 98#endif
96}; 99};
100
101#define DCFG_CCSR_SCRATCHRW1 0x200
102
103static int ls1021a_boot_secondary(unsigned int cpu, struct task_struct *idle)
104{
105 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
106
107 return 0;
108}
109
110static void __init ls1021a_smp_prepare_cpus(unsigned int max_cpus)
111{
112 struct device_node *np;
113 void __iomem *dcfg_base;
114 unsigned long paddr;
115
116 np = of_find_compatible_node(NULL, NULL, "fsl,ls1021a-dcfg");
117 dcfg_base = of_iomap(np, 0);
118 BUG_ON(!dcfg_base);
119
120 paddr = virt_to_phys(secondary_startup);
121 writel_relaxed(cpu_to_be32(paddr), dcfg_base + DCFG_CCSR_SCRATCHRW1);
122
123 iounmap(dcfg_base);
124}
125
126struct smp_operations ls1021a_smp_ops __initdata = {
127 .smp_prepare_cpus = ls1021a_smp_prepare_cpus,
128 .smp_boot_secondary = ls1021a_boot_secondary,
129};