summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/cpu/mpc8xxx/cpu.c
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2010-08-09 18:39:57 -0500
committerKumar Gala <galak@kernel.crashing.org>2010-08-19 02:06:13 -0500
commit680c613a5cc7be59a9123765c51287bc306df02f (patch)
tree66878ea50e3a1aa7f47c868ceb5c18347a311322 /arch/powerpc/cpu/mpc8xxx/cpu.c
parentbd2313078114c4b44c4a5ce149af43bcb7fc8854 (diff)
downloadtalos-obmc-uboot-680c613a5cc7be59a9123765c51287bc306df02f.tar.gz
talos-obmc-uboot-680c613a5cc7be59a9123765c51287bc306df02f.zip
powerpc/8xxx: share PIC defines among 85xx and 86xx
fixes breakeage introduced by commit a37c36f4e70bada297f281b0e542539ad43e50f6 "powerpc/8xxx: query feature reporting register for num cores on unknown cpus" Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/cpu/mpc8xxx/cpu.c')
-rw-r--r--arch/powerpc/cpu/mpc8xxx/cpu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index 97a94f4cd0..5b30fbdc96 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -110,13 +110,15 @@ struct cpu_type *identify_cpu(u32 ver)
}
int cpu_numcores() {
- ccsr_pic_t __iomem *pic = (void *)CONFIG_SYS_MPC85xx_PIC_ADDR;
+ ccsr_pic_t __iomem *pic = (void *)CONFIG_SYS_MPC8xxx_PIC_ADDR;
struct cpu_type *cpu = gd->cpu;
/* better to query feature reporting register than just assume 1 */
+#define MPC8xxx_PICFRR_NCPU_MASK 0x00001f00
+#define MPC8xxx_PICFRR_NCPU_SHIFT 8
if (cpu == &cpu_type_unknown)
- return ((in_be32(&pic->frr) & MPC85xx_PICFRR_NCPU_MASK) >>
- MPC85xx_PICFRR_NCPU_SHIFT) + 1;
+ return ((in_be32(&pic->frr) & MPC8xxx_PICFRR_NCPU_MASK) >>
+ MPC8xxx_PICFRR_NCPU_SHIFT) + 1;
return cpu->num_cores;
}
OpenPOWER on IntegriCloud