summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/cpu/mpc8xxx/fdt.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/mpc8xxx/fdt.c
parent11beefa38267b756252de5d3ed4f88c45f3442c7 (diff)
downloadtalos-obmc-uboot-8f3a7fa4a230f5e974e99b617138e2aaa45109e7.tar.gz
talos-obmc-uboot-8f3a7fa4a230f5e974e99b617138e2aaa45109e7.zip
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/mpc8xxx/fdt.c')
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fdt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index c9956b6398..88c47d1aed 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -26,8 +26,9 @@
#include <common.h>
#include <libfdt.h>
#include <fdt_support.h>
+#include <asm/mp.h>
-#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
+#if defined(CONFIG_MP) && (defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx))
static int ft_del_cpuhandle(void *blob, int cpuhandle)
{
int off, ret = -FDT_ERR_NOTFOUND;
@@ -57,7 +58,7 @@ void ft_fixup_num_cores(void *blob) {
while (off != -FDT_ERR_NOTFOUND) {
u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0);
- if (*reg > num_cores-1) {
+ if ((*reg > num_cores-1) || (is_core_disabled(*reg))) {
int ph = fdt_get_phandle(blob, off);
/* Delete the cpu node once there are no cpu handles */
OpenPOWER on IntegriCloud