diff options
Diffstat (limited to 'arch/arm/mach-socfpga/platsmp.c')
-rw-r--r-- | arch/arm/mach-socfpga/platsmp.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c index 16ca97b039f9..c64d89b7c0ca 100644 --- a/arch/arm/mach-socfpga/platsmp.c +++ b/arch/arm/mach-socfpga/platsmp.c | |||
@@ -34,17 +34,21 @@ static int socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
34 | int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; | 34 | int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; |
35 | 35 | ||
36 | if (socfpga_cpu1start_addr) { | 36 | if (socfpga_cpu1start_addr) { |
37 | /* This will put CPU #1 into reset. */ | ||
38 | writel(RSTMGR_MPUMODRST_CPU1, | ||
39 | rst_manager_base_addr + SOCFPGA_RSTMGR_MODMPURST); | ||
40 | |||
37 | memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size); | 41 | memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size); |
38 | 42 | ||
39 | __raw_writel(virt_to_phys(socfpga_secondary_startup), | 43 | writel(virt_to_phys(socfpga_secondary_startup), |
40 | (sys_manager_base_addr + (socfpga_cpu1start_addr & 0x000000ff))); | 44 | sys_manager_base_addr + (socfpga_cpu1start_addr & 0x000000ff)); |
41 | 45 | ||
42 | flush_cache_all(); | 46 | flush_cache_all(); |
43 | smp_wmb(); | 47 | smp_wmb(); |
44 | outer_clean_range(0, trampoline_size); | 48 | outer_clean_range(0, trampoline_size); |
45 | 49 | ||
46 | /* This will release CPU #1 out of reset.*/ | 50 | /* This will release CPU #1 out of reset. */ |
47 | __raw_writel(0, rst_manager_base_addr + 0x10); | 51 | writel(0, rst_manager_base_addr + SOCFPGA_RSTMGR_MODMPURST); |
48 | } | 52 | } |
49 | 53 | ||
50 | return 0; | 54 | return 0; |
@@ -86,10 +90,9 @@ static void __init socfpga_smp_prepare_cpus(unsigned int max_cpus) | |||
86 | */ | 90 | */ |
87 | static void socfpga_cpu_die(unsigned int cpu) | 91 | static void socfpga_cpu_die(unsigned int cpu) |
88 | { | 92 | { |
89 | cpu_do_idle(); | 93 | /* Do WFI. If we wake up early, go back into WFI */ |
90 | 94 | while (1) | |
91 | /* We should have never returned from idle */ | 95 | cpu_do_idle(); |
92 | panic("cpu %d unexpectedly exit from shutdown\n", cpu); | ||
93 | } | 96 | } |
94 | 97 | ||
95 | struct smp_operations socfpga_smp_ops __initdata = { | 98 | struct smp_operations socfpga_smp_ops __initdata = { |