Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[pandora-kernel.git] / arch / blackfin / mach-bf561 / hotplug.c
1 /*
2  * Copyright 2007-2009 Analog Devices Inc.
3  *               Graff Yang <graf.yang@analog.com>
4  *
5  * Licensed under the GPL-2 or later.
6  */
7
8 #include <linux/smp.h>
9 #include <asm/blackfin.h>
10 #include <mach/pll.h>
11
12 int hotplug_coreb;
13
14 void platform_cpu_die(void)
15 {
16         unsigned long iwr;
17         hotplug_coreb = 1;
18
19         /* disable core timer */
20         bfin_write_TCNTL(0);
21
22         /* clear ipi interrupt IRQ_SUPPLE_0 of CoreB */
23         bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | (1 << (10 + 1)));
24         SSYNC();
25
26         /* set CoreB wakeup by ipi0, iwr will be discarded */
27         bfin_iwr_set_sup0(&iwr, &iwr, &iwr);
28         SSYNC();
29
30         coreb_die();
31 }