diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-19 00:02:35 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-19 00:02:35 (GMT) |
commit | 39710479303fd3affb3e204e9a7a75cc676977b5 (patch) | |
tree | 3fff5fb412df77170883f02fc54bdbee9aba4f22 /arch/blackfin/mach-bf561/hotplug.c | |
parent | 9d20593a722c2dab7a5ab74f5d8c9b604aca52f9 (diff) | |
parent | eb63e5d15758d2b1e607ddd5fb861b5596629380 (diff) | |
download | linux-39710479303fd3affb3e204e9a7a75cc676977b5.tar.xz |
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.c | 32 |
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 0000000..c95169b --- /dev/null +++ b/arch/blackfin/mach-bf561/hotplug.c @@ -0,0 +1,32 @@ +/* + * Copyright 2007-2009 Analog Devices Inc. + * Graff Yang <graf.yang@analog.com> + * + * Licensed under the GPL-2 or later. + */ + +#include <asm/blackfin.h> +#include <asm/smp.h> +#define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1)) + +int hotplug_coreb; + +void platform_cpu_die(void) +{ + unsigned long iwr[2] = {0, 0}; + unsigned long bank = SIC_SYSIRQ(IRQ_SUPPLE_0) / 32; + unsigned long bit = 1 << (SIC_SYSIRQ(IRQ_SUPPLE_0) % 32); + + hotplug_coreb = 1; + + iwr[bank] = bit; + + /* disable core timer */ + bfin_write_TCNTL(0); + + /* clear ipi interrupt IRQ_SUPPLE_0 */ + bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | (1 << (10 + 1))); + SSYNC(); + + coreb_sleep(iwr[0], iwr[1], 0); +} |