aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7791.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
index 2df5bd190fe4..ec979529f30f 100644
--- a/arch/arm/mach-shmobile/smp-r8a7791.c
+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
@@ -20,6 +20,7 @@
20#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
21#include <mach/common.h> 21#include <mach/common.h>
22#include <mach/r8a7791.h> 22#include <mach/r8a7791.h>
23#include <mach/rcar-gen2.h>
23 24
24#define RST 0xe6160000 25#define RST 0xe6160000
25#define CA15BAR 0x0020 26#define CA15BAR 0x0020
@@ -51,9 +52,21 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
51 iounmap(p); 52 iounmap(p);
52} 53}
53 54
55static int r8a7791_smp_boot_secondary(unsigned int cpu,
56 struct task_struct *idle)
57{
58 /* Error out when hardware debug mode is enabled */
59 if (rcar_gen2_read_mode_pins() & BIT(21)) {
60 pr_warn("Unable to boot CPU%u when MD21 is set\n", cpu);
61 return -ENOTSUPP;
62 }
63
64 return shmobile_smp_apmu_boot_secondary(cpu, idle);
65}
66
54struct smp_operations r8a7791_smp_ops __initdata = { 67struct smp_operations r8a7791_smp_ops __initdata = {
55 .smp_prepare_cpus = r8a7791_smp_prepare_cpus, 68 .smp_prepare_cpus = r8a7791_smp_prepare_cpus,
56 .smp_boot_secondary = shmobile_smp_apmu_boot_secondary, 69 .smp_boot_secondary = r8a7791_smp_boot_secondary,
57#ifdef CONFIG_HOTPLUG_CPU 70#ifdef CONFIG_HOTPLUG_CPU
58 .cpu_disable = shmobile_smp_cpu_disable, 71 .cpu_disable = shmobile_smp_cpu_disable,
59 .cpu_die = shmobile_smp_apmu_cpu_die, 72 .cpu_die = shmobile_smp_apmu_cpu_die,