summaryrefslogtreecommitdiff
path: root/cpu/mpc85xx/cpu.c
diff options
context:
space:
mode:
authorPoonam Aggrwal <poonam.aggrwal@freescale.com>2009-07-31 12:08:14 +0530
committerKumar Gala <galak@kernel.crashing.org>2009-08-28 17:12:38 -0500
commit0e870980a64584a591af775bb9c9fe9450124df9 (patch)
tree627bfb5272eb2508ff8ed9027e00d86897af7fee /cpu/mpc85xx/cpu.c
parent18bacc2027f8531d8dec15ba8da3242dfb4e63f3 (diff)
8xxx: Removed CONFIG_NUM_CPUS from 85xx/86xx
The number of CPUs are getting detected dynamically by checking the processor SVR value. Also removed CONFIG_NUM_CPUS references from all the platforms with 85xx/86xx processors. This can help to use the same u-boot image across the platforms. Also revamped and corrected few Freescale Copyright messages. Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'cpu/mpc85xx/cpu.c')
-rw-r--r--cpu/mpc85xx/cpu.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c
index 4724f2764..6be98dc35 100644
--- a/cpu/mpc85xx/cpu.c
+++ b/cpu/mpc85xx/cpu.c
@@ -54,24 +54,23 @@ int checkcpu (void)
int i;
svr = get_svr();
- ver = SVR_SOC_VER(svr);
major = SVR_MAJ(svr);
#ifdef CONFIG_MPC8536
major &= 0x7; /* the msb of this nibble is a mfg code */
#endif
minor = SVR_MIN(svr);
-#if (CONFIG_NUM_CPUS > 1)
- volatile ccsr_pic_t *pic = (void *)(CONFIG_SYS_MPC85xx_PIC_ADDR);
- printf("CPU%d: ", pic->whoami);
-#else
- puts("CPU: ");
-#endif
+ if (cpu_numcores() > 1) {
+ volatile ccsr_pic_t *pic = (void *)(CONFIG_SYS_MPC85xx_PIC_ADDR);
+ printf("CPU%d: ", pic->whoami);
+ } else {
+ puts("CPU: ");
+ }
- cpu = identify_cpu(ver);
- if (cpu) {
- puts(cpu->name);
+ cpu = gd->cpu;
+ if (cpu->name) {
+ puts(cpu->name);
if (IS_E_PROCESSOR(svr))
puts("E");
} else {
@@ -104,7 +103,7 @@ int checkcpu (void)
get_sys_info(&sysinfo);
puts("Clock Configuration:");
- for (i = 0; i < CONFIG_NUM_CPUS; i++) {
+ for (i = 0; i < cpu_numcores(); i++) {
if (!(i & 3))
printf ("\n ");
printf("CPU%d:%-4s MHz, ",