summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc86xx/mp.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2010-06-09 22:33:53 -0500
committerKumar Gala <galak@kernel.crashing.org>2010-07-16 10:55:08 -0500
commit8f3a7fa4a230f5e974e99b617138e2aaa45109e7 (patch)
tree0a6687513dc8baa6144306721048af316da77272 /arch/powerpc/cpu/mpc86xx/mp.c
parent11beefa38267b756252de5d3ed4f88c45f3442c7 (diff)
powerpc/8xxx: Add is_core_disabled to remove disabled cores from dtb
If we explicitly disabled a core remove it from the dtb we pass on to the kernel. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/cpu/mpc86xx/mp.c')
-rw-r--r--arch/powerpc/cpu/mpc86xx/mp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c
index 24eb30aaaa..30c99ebc56 100644
--- a/arch/powerpc/cpu/mpc86xx/mp.c
+++ b/arch/powerpc/cpu/mpc86xx/mp.c
@@ -66,6 +66,23 @@ int cpu_disable(int nr)
return 0;
}
+int is_core_disabled(int nr) {
+ immap_t *immap = (immap_t *) CONFIG_SYS_CCSRBAR;
+ ccsr_gur_t *gur = &immap->im_gur;
+ u32 devdisr = in_be32(&gur->devdisr);
+
+ switch (nr) {
+ case 0:
+ return (devdisr & MPC86xx_DEVDISR_CPU0);
+ case 1:
+ return (devdisr & MPC86xx_DEVDISR_CPU1);
+ default:
+ printf("Invalid cpu number for disable %d\n", nr);
+ }
+
+ return 0;
+}
+
int cpu_release(int nr, int argc, char * const argv[])
{
/* dummy function so common/cmd_mp.c will build