aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2016-12-05 05:39:40 -0500
committerSimon Horman <horms+renesas@verge.net.au>2017-01-03 04:50:43 -0500
commit367ed998fa3e04d8bde42f431e880cd3e5922095 (patch)
treef4e5d55ecbc4433b168e1e0d58e7cbb79316ea7a
parentd03c8f78d03af2a46127537dd1daa67164e53c09 (diff)
ARM: shmobile: r8a7791: Allow booting secondary CPU cores in debug mode
Now debug resource reset is handled properly, allow booting secondary CPU cores when hardware debug mode is enabled (MD21=1, SW8-4=OFF on koelsch) on legacy r8a7791. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7791.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
index 2d6417af73b5..2948c22cfc53 100644
--- a/arch/arm/mach-shmobile/smp-r8a7791.c
+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
@@ -42,21 +42,9 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
42 rcar_gen2_pm_init(); 42 rcar_gen2_pm_init();
43} 43}
44 44
45static int r8a7791_smp_boot_secondary(unsigned int cpu,
46 struct task_struct *idle)
47{
48 /* Error out when hardware debug mode is enabled */
49 if (rcar_gen2_read_mode_pins() & BIT(21)) {
50 pr_warn("Unable to boot CPU%u when MD21 is set\n", cpu);
51 return -ENOTSUPP;
52 }
53
54 return shmobile_smp_apmu_boot_secondary(cpu, idle);
55}
56
57const struct smp_operations r8a7791_smp_ops __initconst = { 45const struct smp_operations r8a7791_smp_ops __initconst = {
58 .smp_prepare_cpus = r8a7791_smp_prepare_cpus, 46 .smp_prepare_cpus = r8a7791_smp_prepare_cpus,
59 .smp_boot_secondary = r8a7791_smp_boot_secondary, 47 .smp_boot_secondary = shmobile_smp_apmu_boot_secondary,
60#ifdef CONFIG_HOTPLUG_CPU 48#ifdef CONFIG_HOTPLUG_CPU
61 .cpu_can_disable = shmobile_smp_cpu_can_disable, 49 .cpu_can_disable = shmobile_smp_cpu_can_disable,
62 .cpu_die = shmobile_smp_apmu_cpu_die, 50 .cpu_die = shmobile_smp_apmu_cpu_die,