-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blackfin: SMP: add PM/CPU hotplug support
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
- Loading branch information
Graf Yang
authored and
Mike Frysinger
committed
Mar 9, 2010
1 parent
0d152c2
commit 0b39db2
Showing
7 changed files
with
138 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters