aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf561/smp.c
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-12-28 06:13:51 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:48 -0500
commit0b39db28b953945232719e7ff6fb802aa8a2be5f (patch)
treec35193b07e9413ed6b5436aa79e24b0f22627082 /arch/blackfin/mach-bf561/smp.c
parent0d152c27e336b5fd777da7dd3e814617e7305afd (diff)
Blackfin: SMP: add PM/CPU hotplug support
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf561/smp.c')
-rw-r--r--arch/blackfin/mach-bf561/smp.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c
index 90369429ee66..3b9a4bf7dacc 100644
--- a/arch/blackfin/mach-bf561/smp.c
+++ b/arch/blackfin/mach-bf561/smp.c
@@ -65,6 +65,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
65 bfin_write_SICB_IAR5(bfin_read_SICA_IAR5()); 65 bfin_write_SICB_IAR5(bfin_read_SICA_IAR5());
66 bfin_write_SICB_IAR6(bfin_read_SICA_IAR6()); 66 bfin_write_SICB_IAR6(bfin_read_SICA_IAR6());
67 bfin_write_SICB_IAR7(bfin_read_SICA_IAR7()); 67 bfin_write_SICB_IAR7(bfin_read_SICA_IAR7());
68 bfin_write_SICB_IWR0(IWR_DISABLE_ALL);
69 bfin_write_SICB_IWR1(IWR_DISABLE_ALL);
68 SSYNC(); 70 SSYNC();
69 71
70 /* Store CPU-private information to the cpu_data array. */ 72 /* Store CPU-private information to the cpu_data array. */
@@ -80,17 +82,18 @@ int __cpuinit platform_boot_secondary(unsigned int cpu, struct task_struct *idle
80{ 82{
81 unsigned long timeout; 83 unsigned long timeout;
82 84
83 /* CoreB already running?! */
84 BUG_ON((bfin_read_SICA_SYSCR() & COREB_SRAM_INIT) == 0);
85
86 printk(KERN_INFO "Booting Core B.\n"); 85 printk(KERN_INFO "Booting Core B.\n");
87 86
88 spin_lock(&boot_lock); 87 spin_lock(&boot_lock);
89 88
90 /* Kick CoreB, which should start execution from CORE_SRAM_BASE. */ 89 if ((bfin_read_SICA_SYSCR() & COREB_SRAM_INIT) == 0) {
91 SSYNC(); 90 /* CoreB already running, sending ipi to wakeup it */
92 bfin_write_SICA_SYSCR(bfin_read_SICA_SYSCR() & ~COREB_SRAM_INIT); 91 platform_send_ipi_cpu(cpu, IRQ_SUPPLE_0);
93 SSYNC(); 92 } else {
93 /* Kick CoreB, which should start execution from CORE_SRAM_BASE. */
94 bfin_write_SICA_SYSCR(bfin_read_SICA_SYSCR() & ~COREB_SRAM_INIT);
95 SSYNC();
96 }
94 97
95 timeout = jiffies + 1 * HZ; 98 timeout = jiffies + 1 * HZ;
96 while (time_before(jiffies, timeout)) { 99 while (time_before(jiffies, timeout)) {