summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/cpu/mpc85xx
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/mpc85xx
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/mpc85xx')
-rw-r--r--arch/powerpc/cpu/mpc85xx/fdt.c4
-rw-r--r--arch/powerpc/cpu/mpc85xx/mp.c23
2 files changed, 25 insertions, 2 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index 1d11ab470f..2628cc5f95 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007-2009 Freescale Semiconductor, Inc.
+ * Copyright 2007-2010 Freescale Semiconductor, Inc.
*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
@@ -404,8 +404,8 @@ void ft_cpu_setup(void *blob, bd_t *bd)
#ifdef CONFIG_MP
ft_fixup_cpu(blob, (u64)bd->bi_memstart + (u64)bd->bi_memsize);
-#endif
ft_fixup_num_cores(blob);
+#endif
ft_fixup_cache(blob);
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index ddbc2211c3..e05257cf04 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -77,6 +77,13 @@ int cpu_disable(int nr)
return 0;
}
+
+int is_core_disabled(int nr) {
+ ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+ u32 coredisrl = in_be32(&gur->coredisrl);
+
+ return (coredisrl & (1 << nr));
+}
#else
int cpu_disable(int nr)
{
@@ -96,6 +103,22 @@ int cpu_disable(int nr)
return 0;
}
+
+int is_core_disabled(int nr) {
+ ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+ u32 devdisr = in_be32(&gur->devdisr);
+
+ switch (nr) {
+ case 0:
+ return (devdisr & MPC85xx_DEVDISR_CPU0);
+ case 1:
+ return (devdisr & MPC85xx_DEVDISR_CPU1);
+ default:
+ printf("Invalid cpu number for disable %d\n", nr);
+ }
+
+ return 0;
+}
#endif
static u8 boot_entry_map[4] = {
OpenPOWER on IntegriCloud