diff options
author | Kim Phillips <kim.phillips@freescale.com> | 2010-08-09 18:39:57 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-08-19 02:06:13 -0500 |
commit | 680c613a5cc7be59a9123765c51287bc306df02f (patch) | |
tree | 66878ea50e3a1aa7f47c868ceb5c18347a311322 /arch/powerpc/cpu/mpc8xxx/cpu.c | |
parent | bd2313078114c4b44c4a5ce149af43bcb7fc8854 (diff) | |
download | u-boot-imx-680c613a5cc7be59a9123765c51287bc306df02f.zip u-boot-imx-680c613a5cc7be59a9123765c51287bc306df02f.tar.gz u-boot-imx-680c613a5cc7be59a9123765c51287bc306df02f.tar.bz2 |
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c index 97a94f4..5b30fbd 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; } |