aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf561/hotplug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 20:02:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 20:02:35 -0400
commit39710479303fd3affb3e204e9a7a75cc676977b5 (patch)
tree3fff5fb412df77170883f02fc54bdbee9aba4f22 /arch/blackfin/mach-bf561/hotplug.c
parent9d20593a722c2dab7a5ab74f5d8c9b604aca52f9 (diff)
parenteb63e5d15758d2b1e607ddd5fb861b5596629380 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (96 commits) Blackfin: stop cleaning include/asm/asm-offsets.h Blackfin: scale calibration when cpu freq changes Blackfin: eat spurious space in asm/dpmc.h Blackfin: fix anomaly 283 handling with exact hardware error Blackfin: bf537-stamp: add example ADXL346 orientation resources Blackfin: bf537-stamp: add example AD2S1210 IIO resources Blackfin: don't support keypad wakeup from hibernate Blackfin: bf537-stamp: add example AD7416 IIO resources Blackfin: bf537-stamp: add example ADP8860 backlight/led resources Blackfin: bf537-stamp: add example AD7414 temp sensor resources Blackfin: rename AD1836 to AD183X in board files Blackfin: bf537-stamp: add example AD2S120x resources Blackfin: add support for the on-chip MAC status interrupts Blackfin: asm/page.h: pull in asm-generic headers Blackfin: mark gpio lib functions static Blackfin: bf537-stamp: add example ADAU1361 resources Blackfin: GPIO: implement to_irq handler Blackfin: bf537-stamp: add example ADP122/ADP150 power regulator resources Blackfin: bf537-stamp: add example AD2S90 resources Blackfin: bf537-stamp: add example AD5398 power regulator resources ...
Diffstat (limited to 'arch/blackfin/mach-bf561/hotplug.c')
-rw-r--r--arch/blackfin/mach-bf561/hotplug.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf561/hotplug.c b/arch/blackfin/mach-bf561/hotplug.c
new file mode 100644
index 000000000000..c95169b612dc
--- /dev/null
+++ b/arch/blackfin/mach-bf561/hotplug.c
@@ -0,0 +1,32 @@
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 <asm/blackfin.h>
9#include <asm/smp.h>
10#define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1))
11
12int hotplug_coreb;
13
14void platform_cpu_die(void)
15{
16 unsigned long iwr[2] = {0, 0};
17 unsigned long bank = SIC_SYSIRQ(IRQ_SUPPLE_0) / 32;
18 unsigned long bit = 1 << (SIC_SYSIRQ(IRQ_SUPPLE_0) % 32);
19
20 hotplug_coreb = 1;
21
22 iwr[bank] = bit;
23
24 /* disable core timer */
25 bfin_write_TCNTL(0);
26
27 /* clear ipi interrupt IRQ_SUPPLE_0 */
28 bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | (1 << (10 + 1)));
29 SSYNC();
30
31 coreb_sleep(iwr[0], iwr[1], 0);
32}