P2020RDB Removed CONFIG_NUM_CPUS for 85xx processor series.
PATCH 4/5 P2020RDB Removed CONFIG_NUM_CPUS for 85xx processor series.
Instead the num of cores is determined dynamically by reading the SVR values. This can help to use the same u-boot image across the platforms.
Added CONFIG_MAX_CPUS value 8.
Also revamped and corrected few Freescale Copyright messages.
--- common/cmd_mp.c | 8 ++- cpu/mpc85xx/cpu.c | 104 ++++++++++++++++++++++++---------------- cpu/mpc85xx/mp.c | 6 +- cpu/mpc85xx/release.S | 25 +++++++++- cpu/mpc85xx/speed.c | 4 +- include/asm-ppc/config.h | 1 + include/asm-ppc/global_data.h | 5 ++ include/asm-ppc/processor.h | 5 +- include/common.h | 1 + include/e500.h | 6 +-- lib_ppc/board.c | 4 +- lib_ppc/bootm.c | 3 +- 12 files changed, 112 insertions(+), 60 deletions(-)
common/cmd_mp.c +5 -3
@@ -1,5 +1,5 @@/* -* Copyright 2008 Freescale Semiconductor, Inc. +* Copyright (C) 2008-2009 Freescale Semiconductor, Inc. All rights reserved. * * See file CREDITS for list of people who contributed to this * project.
@@ -23,6 +23,8 @@#include <common.h> #include <command.h> +DECLARE_GLOBAL_DATA_PTR ; +int cpu_cmd (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {
@@ -34,9 +36,9 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } cpuid =simple_strtoul (argv[1 ],NULL ,10 ); -if (cpuid >=CONFIG_NUM_CPUS ) { +if (cpuid >= gd->cpu->num_cores) {printf ("Core num: %lu is out of range[0..%d]\n" , - cpuid,CONFIG_NUM_CPUS -1 ); + cpuid, gd->cpu->num_cores -1 );return 1 ; }
cpu/mpc85xx/cpu.c +62 -42
140 lines not on this page · raw message
cpu/mpc85xx/mp.c +3 -3
@@ -1,5 +1,5 @@/* -* Copyright 2008 Freescale Semiconductor. +* Copyright (C) 2008-2009 Freescale Semiconductor, Inc. All rights reserved. * * See file CREDITS for list of people who contributed to this * project.
@@ -157,7 +157,7 @@ static void pq3_mp_up(unsigned long bootpg)out_be32 (&gur->devdisr, devdisr);/* release the hounds */ - up = ((1 <<CONFIG_NUM_CPUS ) -1 ); + up = ((1 << gd->cpu->num_cores) -1 ); bpcr =in_be32 (&ecm->eebpcr); bpcr |= (up <<24 );out_be32 (&ecm->eebpcr, bpcr);
@@ -167,7 +167,7 @@ static void pq3_mp_up(unsigned long bootpg)/* wait for everyone */ while (timeout) {int i; -for (i =0 ; i <CONFIG_NUM_CPUS ; i++) { +for (i =0 ; i < gd->cpu->num_cores; i++) {if (table[i *NUM_BOOT_ENTRY +BOOT_ENTRY_ADDR_LOWER ]) cpu_up_mask |= (1 << i); };
cpu/mpc85xx/release.S +24 -1
@@ -1,3 +1,26 @@ +/* + * Copyright (C) 2008-2009 Freescale Semiconductor, Inc. All rights reserved. + * Kumar Gala <[email protected]> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + #include <config.h> #include <mpc85xx.h> #include <version.h>
@@ -203,7 +226,7 @@ __secondary_start_page: .align L1_CACHE_SHIFT .globl __spin_table __spin_table: - .space CONFIG_NUM_CPUS*ENTRY_SIZE + .space CONFIG_MAX_CPUS*ENTRY_SIZE /* Fill in the empty space. The actual reset vector is * the last word of the page */
cpu/mpc85xx/speed.c +2 -2
@@ -1,5 +1,5 @@/* -* Copyright 2004, 2007-2009 Freescale Semiconductor Inc. +* Copyright (C) 2004, 2007-2009 Freescale Semiconductor, Inc. All rights reserved. * (C) Copyright 2003 Motorola Inc. * Xianghua Xiao, (X.Xiao at motorola.com) *
@@ -51,7 +51,7 @@ void get_sys_info (sys_info_t * sysInfo)/* Divide before multiply to avoid integer * overflow for processor speeds above 2GHz */ half_freqSystemBus = sysInfo->freqSystemBus/2 ; -for (i =0 ; i <CONFIG_NUM_CPUS ; i++) { +for (i =0 ; i < gd->cpu->num_cores; i++) { e500_ratio = ((gur->porpllsr) >> (i *8 +16 )) &0x3f ; sysInfo->freqProcessor[i] = e500_ratio * half_freqSystemBus; }
include/asm-ppc/config.h +1 -0
@@ -29,4 +29,5 @@#endif #endif +#define CONFIG_MAX_CPUS 8#endif
include/asm-ppc/global_data.h +5 -0
@@ -1,4 +1,5 @@/* +* Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved. * (C) Copyright 2002 * Wolfgang Denk, DENX Software Engineering, wd at denx.de. *
@@ -25,6 +26,7 @@#define __ASM_GBL_DATA_H#include "asm/types.h" +#include "asm/processor.h" /* * The following data structure is placed in some memory wich is
@@ -92,6 +94,9 @@ typedef struct global_data {#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)u32 lbc_clk;#endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */ +#if defined(CONFIG_MPC85xx) +struct cpu_type *cpu; +#endif #if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)u32 i2c1_clk;u32 i2c2_clk;
include/asm-ppc/processor.h +3 -2
@@ -1017,13 +1017,14 @@ n:struct cpu_type {char name[15 ];u32 soc_ver; +u32 num_cores; };struct cpu_type *identify_cpu (u32 ver);#if defined(CONFIG_MPC85xx) -#define CPU_TYPE_ENTRY (n, v) \ - { .name = #n, .soc_ver = SVR_##v, } +#define CPU_TYPE_ENTRY (n, v, nc) \ + { .name = #n, .soc_ver = SVR_##v, .num_cores = (nc), }#else #if defined(CONFIG_MPC83xx)#define CPU_TYPE_ENTRY (x) {#x, SPR_##x}
include/common.h +1 -0
@@ -439,6 +439,7 @@ void ppcDWstore(unsigned int *addr, unsigned int *value);#endif /* $(CPU)/cpu.c */ +int probecpu (void );int checkcpu (void );int checkicache (void );int checkdcache (void );
include/e500.h +1 -5
@@ -8,13 +8,9 @@ #ifndef __ASSEMBLY__ -#ifndef CONFIG_NUM_CPUS -#define CONFIG_NUM_CPUS 1 -#endif - typedef struct { - unsigned long freqProcessor[CONFIG_NUM_CPUS]; + unsigned long freqProcessor[CONFIG_MAX_CPUS]; unsigned long freqSystemBus; unsigned long freqDDRBus; unsigned long freqLocalBus;
lib_ppc/board.c +3 -1
@@ -290,7 +290,9 @@ init_fnc_t *init_sequence[] = {#if defined(CONFIG_BOARD_EARLY_INIT_F ) board_early_init_f,#endif - +#if defined(CONFIG_MPC85xx) + probecpu, +#endif #if !defined(CONFIG_8xx_CPUCLK_DEFAULT) get_clocks, /* get CPU and bus clocks (etc.) */#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M ) \
lib_ppc/bootm.c +2 -1
@@ -170,11 +170,12 @@ void arch_lmb_reserve(struct lmb *lmb)static void boot_prep_linux (void ) { -#if (CONFIG_NUM_CPUS >1 ) +#ifdef CONFIG_MP /* if we are MP make sure to flush the dcache() to any changes are made * visibile to all other cores */ flush_dcache ();#endif +return ; }
Signature · 1 line
1.5.6.3
PATCH 4/5 P2020RDB Removed CONFIG_NUM_CPUS for 85xx processor series.
Quoted 12 lines · Poonam Aggrwal
Instead the num of cores is determined dynamically by reading the SVR values.
This can help to use the same u-boot image across the platforms.Added
CONFIG_MAX_CPUSvalue 8.Also revamped and corrected few Freescale Copyright messages.
Signed-off-by Poonam Aggrwal <[email protected]>---
common/cmd_mp.c| 8 ++-cpu/mpc85xx/cpu.c| 104 +++++++++++++++++++++++
Quoted 12 lines
+---------------- cpu/mpc85xx/mp.c | 6 +- cpu/mpc85xx/release.S | 25 +++++++++- cpu/mpc85xx/speed.c | 4 +- include/asm-ppc/config.h | 1 + include/asm-ppc/global_data.h | 5 ++ include/asm-ppc/processor.h | 5 +- include/common.h | 1 + include/e500.h | 6 +-- lib_ppc/board.c | 4 +- lib_ppc/bootm.c | 3 +- 12 files changed, 112 insertions(+), 60 deletions(-)
This doesn't apply cleanly to the 85xx tree. Also this breaks building things like MPC8641HPCN
Quoted 22 lines
common/cmd_mp.c +1
-1@@ -1,5 +1,5 @@/* -* Copyright 2008 Freescale Semiconductor, Inc. +* Copyright (C) 2008-2009 Freescale Semiconductor, Inc. All rights reserved.
*
* See file CREDITS for list of people who contributed to this
* project.common/cmd_mp.c +2
-0@@ -23,6 +23,8 @@#include <common.h> #include <command.h> +DECLARE_GLOBAL_DATA_PTR ; +int
cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){
common/cmd_mp.c cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char · line 40
Quoted 6 lines
common/cmd_mp.c +1
-1@@ -34,9 +36,9 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } cpuid = simple_strtoul(argv[1], NULL, 10); -if (cpuid >=CONFIG_NUM_CPUS ) { +if (cpuid >= gd->cpu->num_cores) {
Don't use gd->cpu->num_cores here, create a function like cpu_numcores() to hid how we determine the # of cores.
Quoted 98 lines
common/cmd_mp.c +1
-1printf ("Core num: %lu is out of range[0..%d]\n" , - cpuid,CONFIG_NUM_CPUS -1 ); + cpuid, gd->cpu->num_cores -1 );return 1 ; }cpu/mpc85xx/cpu.c +1
-1@@ -1,5 +1,5 @@/* -* Copyright 2004,2007,2008 Freescale Semiconductor, Inc. +* Copyright(C) 2004,2007-2009 Freescale Semiconductor, Inc. All rights reserved.
* (C) Copyright 2002, 2003 Motorola Inc.
* Xianghua Xiao (X.Xiao at motorola.com)
*cpu/mpc85xx/cpu.c +37
-31@@ -38,37 +38,37 @@DECLARE_GLOBAL_DATA_PTR ;struct cpu_type cpu_type_list [] = { -CPU_TYPE_ENTRY (8533 ,8533 ), - CPU_TYPE_ENTRY(8533, 8533_E), -CPU_TYPE_ENTRY (8535 ,8535 ), - CPU_TYPE_ENTRY(8535, 8535_E), -CPU_TYPE_ENTRY (8536 ,8536 ), - CPU_TYPE_ENTRY(8536, 8536_E), -CPU_TYPE_ENTRY (8540 ,8540 ), -CPU_TYPE_ENTRY (8541 ,8541 ), - CPU_TYPE_ENTRY(8541, 8541_E), -CPU_TYPE_ENTRY (8543 ,8543 ), - CPU_TYPE_ENTRY(8543, 8543_E), -CPU_TYPE_ENTRY (8544 ,8544 ), - CPU_TYPE_ENTRY(8544, 8544_E), -CPU_TYPE_ENTRY (8545 ,8545 ), - CPU_TYPE_ENTRY(8545, 8545_E), - CPU_TYPE_ENTRY(8547, 8547_E), -CPU_TYPE_ENTRY (8548 ,8548 ), - CPU_TYPE_ENTRY(8548, 8548_E), -CPU_TYPE_ENTRY (8555 ,8555 ), - CPU_TYPE_ENTRY(8555, 8555_E), -CPU_TYPE_ENTRY (8560 ,8560 ), -CPU_TYPE_ENTRY (8567 ,8567 ), - CPU_TYPE_ENTRY(8567, 8567_E), -CPU_TYPE_ENTRY (8568 ,8568 ), - CPU_TYPE_ENTRY(8568, 8568_E), -CPU_TYPE_ENTRY (8569 ,8569 ), - CPU_TYPE_ENTRY(8569, 8569_E), -CPU_TYPE_ENTRY (8572 ,8572 ), - CPU_TYPE_ENTRY(8572, 8572_E), -CPU_TYPE_ENTRY (P2020 ,P2020 ), -CPU_TYPE_ENTRY (P2020 ,P2020_E ), +CPU_TYPE_ENTRY (8533 ,8533 ,1 ), + CPU_TYPE_ENTRY(8533, 8533_E, 1), +CPU_TYPE_ENTRY (8535 ,8535 ,1 ), + CPU_TYPE_ENTRY(8535, 8535_E, 1), +CPU_TYPE_ENTRY (8536 ,8536 ,1 ), + CPU_TYPE_ENTRY(8536, 8536_E, 1), +CPU_TYPE_ENTRY (8540 ,8540 ,1 ), +CPU_TYPE_ENTRY (8541 ,8541 ,1 ), + CPU_TYPE_ENTRY(8541, 8541_E, 1), +CPU_TYPE_ENTRY (8543 ,8543 ,1 ), + CPU_TYPE_ENTRY(8543, 8543_E, 1), +CPU_TYPE_ENTRY (8544 ,8544 ,1 ), + CPU_TYPE_ENTRY(8544, 8544_E, 1), +CPU_TYPE_ENTRY (8545 ,8545 ,1 ), + CPU_TYPE_ENTRY(8545, 8545_E, 1), + CPU_TYPE_ENTRY(8547, 8547_E, 1), +CPU_TYPE_ENTRY (8548 ,8548 ,1 ), + CPU_TYPE_ENTRY(8548, 8548_E, 1), +CPU_TYPE_ENTRY (8555 ,8555 ,1 ), + CPU_TYPE_ENTRY(8555, 8555_E, 1), +CPU_TYPE_ENTRY (8560 ,8560 ,1 ), +CPU_TYPE_ENTRY (8567 ,8567 ,1 ), + CPU_TYPE_ENTRY(8567, 8567_E, 1), +CPU_TYPE_ENTRY (8568 ,8568 ,1 ), + CPU_TYPE_ENTRY(8568, 8568_E, 1), +CPU_TYPE_ENTRY (8569 ,8569 ,1 ), + CPU_TYPE_ENTRY(8569, 8569_E, 1), +CPU_TYPE_ENTRY (8572 ,8572 ,2 ), + CPU_TYPE_ENTRY(8572, 8572_E, 2), +CPU_TYPE_ENTRY (P2020 ,P2020 ,2 ), +CPU_TYPE_ENTRY (P2020 ,P2020_E ,2 ), };struct cpu_type *identify_cpu (u32 ver)@@ -81,6 +81,19 @@ struct cpu_type *identify_cpu(u32 ver)return NULL ; } +int probecpu (void ) +{ +uint svr; +uint ver; + + svr =get_svr ();
cpu/mpc85xx/cpu.c struct cpu_type *identify_cpu(u32 ver) · line 99
Quoted 10 lines
cpu/mpc85xx/cpu.c +7
-0+ ver =SVR_SOC_VER (svr); + + gd->cpu =identify_cpu (ver); + +return 0 ; +} +int checkcpu (void ) {sys_info_t sysinfo;
got a warning about cpu not being used anymore
Quoted 147 lines
cpu/mpc85xx/cpu.c +17
-10@@ -100,23 +113,30 @@ 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: " ); +#ifndef CONFIG_MP +if (gd->cpu->num_cores >1 ) +puts ("#############################################\n" +"The system is detected to be MULTICORE,\n" +"but u-boot is built with UNI-CORE\n" +"To enable mutlticore Build set CONFIG_MP\n" +"#############################################\n\n" );#endif - cpu =identify_cpu (ver); -if (cpu) { -puts (cpu->name); +if (gd->cpu->num_cores >1 ) { +volatile ccsr_pic_t *pic = (void *)(CONFIG_SYS_MPC85xx_PIC_ADDR); +printf ("CPU%d: " , pic->whoami); + } +else +puts ("CPU: " ); + +if (gd->cpu->name) { +puts (gd->cpu->name);if (IS_E_PROCESSOR (svr))puts ("E" );@@ -150,7 +170,7 @@ int checkcpu (void)get_sys_info (&sysinfo);puts ("Clock Configuration:" ); -for (i =0 ; i <CONFIG_NUM_CPUS ; i++) { +for (i =0 ; i < gd->cpu->num_cores; i++) {if (!(i &3 ))printf ("\n " ); printf("CPU%d:%-4s MHz, ",cpu/mpc85xx/mp.c +1
-1@@ -1,5 +1,5 @@/* -* Copyright 2008 Freescale Semiconductor. +* Copyright (C) 2008-2009 Freescale Semiconductor, Inc. All rights reserved.
*
* See file CREDITS for list of people who contributed to this
* project.cpu/mpc85xx/mp.c +2
-2@@ -157,7 +157,7 @@ static void pq3_mp_up(unsigned long bootpg)out_be32 (&gur->devdisr, devdisr);/* release the hounds */ - up = ((1 <<CONFIG_NUM_CPUS ) -1 ); + up = ((1 << gd->cpu->num_cores) -1 ); bpcr =in_be32 (&ecm->eebpcr); bpcr |= (up <<24 );out_be32 (&ecm->eebpcr, bpcr);@@ -167,7 +167,7 @@ static void pq3_mp_up(unsigned long bootpg)/* wait for everyone */ while (timeout) {int i; -for (i =0 ; i <CONFIG_NUM_CPUS ; i++) { +for (i =0 ; i < gd->cpu->num_cores; i++) {if (table[i *NUM_BOOT_ENTRY +BOOT_ENTRY_ADDR_LOWER ]) cpu_up_mask |= (1 << i); };cpu/mpc85xx/release.S +2
-0@@ -1,3 +1,26 @@ +/* + * Copyright (C) 2008-2009 Freescale Semiconductor, Inc. All rightsreserved.
+ * Kumar Gala <[email protected]>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
#include <config.h>
#include <mpc85xx.h>
#include <version.h>cpu/mpc85xx/release.S +0
-0@@ -203,7 +226,7 @@ __secondary_start_page: .align L1_CACHE_SHIFT .globl __spin_table
__spin_table:cpu/mpc85xx/release.S +1
-1- .space CONFIG_NUM_CPUS*ENTRY_SIZE + .space CONFIG_MAX_CPUS*ENTRY_SIZE/* Fill in the empty space. The actual reset vector is * the last word of the page */cpu/mpc85xx/speed.c +1
-1@@ -1,5 +1,5 @@/* -* Copyright 2004, 2007-2009 Freescale Semiconductor Inc. +* Copyright (C) 2004, 2007-2009 Freescale Semiconductor, Inc. All rights reserved.
* (C) Copyright 2003 Motorola Inc.
* Xianghua Xiao, (X.Xiao at motorola.com)
*cpu/mpc85xx/speed.c +1
-1@@ -51,7 +51,7 @@ void get_sys_info (sys_info_t * sysInfo)/* Divide before multiply to avoid integer * overflow for processor speeds above 2GHz */ half_freqSystemBus = sysInfo->freqSystemBus/2 ; -for (i =0 ; i <CONFIG_NUM_CPUS ; i++) { +for (i =0 ; i < gd->cpu->num_cores; i++) { e500_ratio = ((gur->porpllsr) >> (i *8 +16 )) &0x3f ; sysInfo->freqProcessor[i] = e500_ratio * half_freqSystemBus; }include/asm-ppc/config.h +0
-0
include/asm-ppc/config.h line 32
Quoted 4 lines
include/asm-ppc/config.h +1
-0@@ -29,4 +29,5 @@#endif #endif +#define CONFIG_MAX_CPUS 8
Let's be a bit smarter w/this.
#if defined(CONFIG_MPC8572)
#define CONFIG_MAX_CPUS 2
#elif defined(CONFIG_MPC8641)
#define CONFIG_MAX_CPUS 2
...
Quoted 14 lines
include/asm-ppc/config.h +0
-0#endif include/asm-ppc/ renamed from include/asm-ppc/global_data.h +0
-0
global_data.h
index 244c161..2fac9a3 100644include/asm-ppc/global_data.h +1
-0@@ -1,4 +1,5 @@/* +* Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved.
* (C) Copyright 2002
* Wolfgang Denk, DENX Software Engineering, wd at denx.de. *
include/asm-ppc/global_data.h line 29
Quoted 4 lines
include/asm-ppc/global_data.h +1
-0@@ -25,6 +26,7 @@#define __ASM_GBL_DATA_H#include "asm/types.h" +#include "asm/processor.h"
don't include asm/processor.h here, just do something like:
struct cpu_type;
since we just have a pointer to it we don't need to expose all of asm/ processor.h to everything.
Quoted 109 lines
include/asm-ppc/global_data.h +3
-0/* * The following data structure is placed in some memory wich is @@ -92,6 +94,9 @@ typedef struct global_data {#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)u32 lbc_clk;#endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */ +#if defined(CONFIG_MPC85xx) +struct cpu_type *cpu; +#endif #if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)u32 i2c1_clk;u32 i2c2_clk;include/asm-ppc/processor.h +3
-2@@ -1017,13 +1017,14 @@ n:struct cpu_type {char name[15 ];u32 soc_ver; +u32 num_cores; };struct cpu_type *identify_cpu (u32 ver);#if defined(CONFIG_MPC85xx) -#define CPU_TYPE_ENTRY (n, v) \ - { .name = #n, .soc_ver = SVR_##v, } +#define CPU_TYPE_ENTRY (n, v, nc) \ + { .name = #n, .soc_ver = SVR_##v, .num_cores = (nc), }#else #if defined(CONFIG_MPC83xx)#define CPU_TYPE_ENTRY (x) {#x, SPR_##x}include/common.h +1
-0@@ -439,6 +439,7 @@ void ppcDWstore(unsigned int *addr, unsigned int *value);#endif /* $(CPU)/cpu.c */ +int probecpu (void );int checkcpu (void );int checkicache (void );int checkdcache (void);
include/e500.h +0
-4@@ -8,13 +8,9 @@#ifndef __ASSEMBLY__ -#ifndef CONFIG_NUM_CPUS -#define CONFIG_NUM_CPUS 1 -#endif -typedef struct
{include/e500.h +1
-1-unsigned long freqProcessor[CONFIG_NUM_CPUS ]; +unsigned long freqProcessor[CONFIG_MAX_CPUS ];unsigned long freqSystemBus;unsigned long freqDDRBus;unsigned long freqLocalBus;lib_ppc/board.c +3
-1@@ -290,7 +290,9 @@ init_fnc_t *init_sequence[] = {#if defined(CONFIG_BOARD_EARLY_INIT_F ) board_early_init_f,#endif - +#if defined(CONFIG_MPC85xx) + probecpu, +#endif #if !defined(CONFIG_8xx_CPUCLK_DEFAULT) get_clocks, /* get CPU and bus clocks (etc.) */#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M ) \lib_ppc/bootm.c +1
-1@@ -170,11 +170,12 @@ void arch_lmb_reserve(struct lmb *lmb)static void boot_prep_linux (void ) { -#if (CONFIG_NUM_CPUS >1 ) +#ifdef CONFIG_MP /* if we are MP make sure to flush the dcache() to any changes are made
* visibile to all other cores */ flush_dcache(); #endif + return ; }Signature · 6 lines
1.5.6.3 _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
PATCH 4/5 P2020RDB Removed CONFIG_NUM_CPUS for 85xx processor series.
Quoted 34 lines
-----Original Message-----
From: Kumar Gala [mailto:galak at kernel.crashing.org]
Sent: Thursday, July 02, 2009 7:20 PM
To: Aggrwal Poonam-B10812
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 4/5]P2020RDB RemovedCONFIG_NUM_CPUSfor 85xx processor series.Quoted 1 line · Poonam Aggrwal
Instead the num of cores is determined dynamically by
reading the SVR
Quoted 19 lines
values.
This can help to use the same u-boot image across the platforms.Added
CONFIG_MAX_CPUSvalue 8.Also revamped and corrected few Freescale Copyright messages.
Signed-off-by Poonam Aggrwal <[email protected]>---
common/cmd_mp.c| 8 ++-cpu/mpc85xx/cpu.c| 104 ++++++++++++++++++++++++---------------- cpu/mpc85xx/mp.c | 6 +- cpu/mpc85xx/release.S | 25 +++++++++-lib_ppc/bootm.c +0
-0@@ -170,11 +170,12 @@ void arch_lmb_reserve(struct lmb *lmb)
Quoted 14 lines
lib_ppc/bootm.c void arch_lmb_reserve(struct lmb *lmb)
Quoted 5 lines
lib_ppc/bootm.c +1
-1static void boot_prep_linux (void ) { -#if (CONFIG_NUM_CPUS >1 ) +#ifdef CONFIG_MP /* if we are MP make sure to flush the dcache() to any changes are
Quoted 8 lines
made
* visibile to all other cores */ flush_dcache(); #endif + return ; }
Thanks for the comments.
Will incorporate them and resend the patch.
One question Should I also make the changes for 86xx as well in the same patch?
Now that 86xx also follows the same CPU_TYPE_ENTRY structure.
Regards
Poonam
Quoted 9 lines
Quoted 7 lines
Signature · 6 lines
1.5.6.3 _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
PATCH 4/5 P2020RDB Removed CONFIG_NUM_CPUS for 85xx processor series.
Quoted 48 lines · On Jul 2, 2009, at 10:58 PM, Aggrwal Poonam-B10812 wrote:
Quoted 34 lines
-----Original Message-----
From: Kumar Gala [mailto:galak at kernel.crashing.org]
Sent: Thursday, July 02, 2009 7:20 PM
To: Aggrwal Poonam-B10812
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 4/5]P2020RDB RemovedCONFIG_NUM_CPUSfor 85xx processor series.Quoted 1 line · Poonam Aggrwal
Instead the num of cores is determined dynamically by
reading the SVR
Quoted 19 lines
values.
This can help to use the same u-boot image across the platforms.Added
CONFIG_MAX_CPUSvalue 8.Also revamped and corrected few Freescale Copyright messages.
Signed-off-by Poonam Aggrwal <[email protected]>---
common/cmd_mp.c| 8 ++-cpu/mpc85xx/cpu.c| 104 ++++++++++++++++++++++++---------------- cpu/mpc85xx/mp.c | 6 +- cpu/mpc85xx/release.S | 25 +++++++++-lib_ppc/bootm.c +0
-0@@ -170,11 +170,12 @@ void arch_lmb_reserve(struct lmb *lmb)Quoted 14 lines
lib_ppc/bootm.c void arch_lmb_reserve(struct lmb *lmb)
Quoted 5 lines
lib_ppc/bootm.c +1
-1static void boot_prep_linux (void ) { -#if (CONFIG_NUM_CPUS >1 ) +#ifdef CONFIG_MP /* if we are MP make sure to flush the dcache() to any changes are
Quoted 8 lines
made
* visibile to all other cores */ flush_dcache(); #endif + return ; }
Quoted 6 lines
Thanks for the comments.
Will incorporate them and resend the patch.
One question Should I also make the changes for 86xx as well in the same
patch?
Now that 86xx also follows the sameCPU_TYPE_ENTRYstructure.
Yes. I've already committed a patch for 86xx to us the basic setup of CPU_TYPE_ENTRY as 85xx. This is in the u-boot-85xx.git tree.
http://git.denx.de/?p=u-boot/u-boot-mpc85xx.git;a=commit;h=480f61790565d77432b70b4016b73f2ae27d530f
Please update the patches based on the u-boot-85xx.git tree
- k
PATCH 4/5 P2020RDB Removed CONFIG_NUM_CPUS for 85xx processor series.
In reply to Kumar GalaQuoted 39 lines
-----Original Message-----
From: Kumar Gala [mailto:galak at kernel.crashing.org]
Sent: Thursday, July 02, 2009 7:20 PM
To: Aggrwal Poonam-B10812
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 4/5]P2020RDB RemovedCONFIG_NUM_CPUSfor 85xx processor series.Quoted 1 line · Poonam Aggrwal
Instead the num of cores is determined dynamically by
reading the SVR
Quoted 11 lines
values.
This can help to use the same u-boot image across the platforms.Added
CONFIG_MAX_CPUSvalue 8.Also revamped and corrected few Freescale Copyright messages.
Signed-off-by Poonam Aggrwal <[email protected]>---
common/cmd_mp.c| 8 ++-cpu/mpc85xx/cpu.c| 104 +++++++++++++++++++++++Quoted 12 lines
+---------------- cpu/mpc85xx/mp.c | 6 +- cpu/mpc85xx/release.S | 25 +++++++++- cpu/mpc85xx/speed.c | 4 +- include/asm-ppc/config.h | 1 + include/asm-ppc/global_data.h | 5 ++ include/asm-ppc/processor.h | 5 +- include/common.h | 1 + include/e500.h | 6 +-- lib_ppc/board.c | 4 +- lib_ppc/bootm.c | 3 +- 12 files changed, 112 insertions(+), 60 deletions(-)
Quoted 2 lines
This doesn't apply cleanly to the 85xx tree. Also this breaks building things like MPC8641HPCN
The patches were made of u-boot-mirror at git.am.freescale.net as already discussed with you.
I tried to apply, the patch applies to u-boot mirror head as well. Anyways, I will look into the build break for 8641. Regards
Poonam
Quoted 455 lines
common/cmd_mp.c index
Quoted 2 lines
common/cmd_mp.c index renamed from common/cmd_mp.c +0
-0faa8700..d943832
Quoted 17 lines
100644
common/cmd_mp.c +1
-1@@ -1,5 +1,5 @@/* -* Copyright 2008 Freescale Semiconductor, Inc. +* Copyright (C) 2008-2009 Freescale Semiconductor, Inc. All rights reserved.
*
* See file CREDITS for list of people who contributed to this
* project.common/cmd_mp.c +2
-0@@ -23,6 +23,8 @@#include <common.h> #include <command.h> +DECLARE_GLOBAL_DATA_PTR ; +Quoted 2 lines
int
cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){ @@ -34,9
common/cmd_mp.c cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 39
Quoted 7 lines
+36,9 @@
cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])} cpuid = simple_strtoul(argv[1], NULL, 10);common/cmd_mp.c +1
-1-if (cpuid >=CONFIG_NUM_CPUS ) { +if (cpuid >= gd->cpu->num_cores) {Don't use
gd->cpu->num_coreshere, create a function likecpu_numcores()to hid how we determine the # of cores.Quoted 98 lines
printf ("Core num: %lu is out of range[0..%d]\n",common/cmd_mp.c +1
-1- cpuid, CONFIG_NUM_CPUS - 1); + cpuid, gd->cpu->num_cores - 1);return 1; }cpu/mpc85xx/cpu.c +1
-1@@ -1,5 +1,5 @@/* -* Copyright 2004,2007,2008 Freescale Semiconductor, Inc. +* Copyright(C) 2004,2007-2009 Freescale Semiconductor, Inc. All rights reserved.
* (C) Copyright 2002, 2003 Motorola Inc.
* Xianghua Xiao (X.Xiao at motorola.com)
*cpu/mpc85xx/cpu.c +37
-31@@ -38,37 +38,37 @@DECLARE_GLOBAL_DATA_PTR ;struct cpu_type cpu_type_list [] = { -CPU_TYPE_ENTRY (8533 ,8533 ), - CPU_TYPE_ENTRY(8533, 8533_E), -CPU_TYPE_ENTRY (8535 ,8535 ), - CPU_TYPE_ENTRY(8535, 8535_E), -CPU_TYPE_ENTRY (8536 ,8536 ), - CPU_TYPE_ENTRY(8536, 8536_E), -CPU_TYPE_ENTRY (8540 ,8540 ), -CPU_TYPE_ENTRY (8541 ,8541 ), - CPU_TYPE_ENTRY(8541, 8541_E), -CPU_TYPE_ENTRY (8543 ,8543 ), - CPU_TYPE_ENTRY(8543, 8543_E), -CPU_TYPE_ENTRY (8544 ,8544 ), - CPU_TYPE_ENTRY(8544, 8544_E), -CPU_TYPE_ENTRY (8545 ,8545 ), - CPU_TYPE_ENTRY(8545, 8545_E), - CPU_TYPE_ENTRY(8547, 8547_E), -CPU_TYPE_ENTRY (8548 ,8548 ), - CPU_TYPE_ENTRY(8548, 8548_E), -CPU_TYPE_ENTRY (8555 ,8555 ), - CPU_TYPE_ENTRY(8555, 8555_E), -CPU_TYPE_ENTRY (8560 ,8560 ), -CPU_TYPE_ENTRY (8567 ,8567 ), - CPU_TYPE_ENTRY(8567, 8567_E), -CPU_TYPE_ENTRY (8568 ,8568 ), - CPU_TYPE_ENTRY(8568, 8568_E), -CPU_TYPE_ENTRY (8569 ,8569 ), - CPU_TYPE_ENTRY(8569, 8569_E), -CPU_TYPE_ENTRY (8572 ,8572 ), - CPU_TYPE_ENTRY(8572, 8572_E), -CPU_TYPE_ENTRY (P2020 ,P2020 ), -CPU_TYPE_ENTRY (P2020 ,P2020_E ), +CPU_TYPE_ENTRY (8533 ,8533 ,1 ), + CPU_TYPE_ENTRY(8533, 8533_E, 1), +CPU_TYPE_ENTRY (8535 ,8535 ,1 ), + CPU_TYPE_ENTRY(8535, 8535_E, 1), +CPU_TYPE_ENTRY (8536 ,8536 ,1 ), + CPU_TYPE_ENTRY(8536, 8536_E, 1), +CPU_TYPE_ENTRY (8540 ,8540 ,1 ), +CPU_TYPE_ENTRY (8541 ,8541 ,1 ), + CPU_TYPE_ENTRY(8541, 8541_E, 1), +CPU_TYPE_ENTRY (8543 ,8543 ,1 ), + CPU_TYPE_ENTRY(8543, 8543_E, 1), +CPU_TYPE_ENTRY (8544 ,8544 ,1 ), + CPU_TYPE_ENTRY(8544, 8544_E, 1), +CPU_TYPE_ENTRY (8545 ,8545 ,1 ), + CPU_TYPE_ENTRY(8545, 8545_E, 1), + CPU_TYPE_ENTRY(8547, 8547_E, 1), +CPU_TYPE_ENTRY (8548 ,8548 ,1 ), + CPU_TYPE_ENTRY(8548, 8548_E, 1), +CPU_TYPE_ENTRY (8555 ,8555 ,1 ), + CPU_TYPE_ENTRY(8555, 8555_E, 1), +CPU_TYPE_ENTRY (8560 ,8560 ,1 ), +CPU_TYPE_ENTRY (8567 ,8567 ,1 ), + CPU_TYPE_ENTRY(8567, 8567_E, 1), +CPU_TYPE_ENTRY (8568 ,8568 ,1 ), + CPU_TYPE_ENTRY(8568, 8568_E, 1), +CPU_TYPE_ENTRY (8569 ,8569 ,1 ), + CPU_TYPE_ENTRY(8569, 8569_E, 1), +CPU_TYPE_ENTRY (8572 ,8572 ,2 ), + CPU_TYPE_ENTRY(8572, 8572_E, 2), +CPU_TYPE_ENTRY (P2020 ,P2020 ,2 ), +CPU_TYPE_ENTRY (P2020 ,P2020_E ,2 ), };struct cpu_type *identify_cpu (u32 ver)@@ -81,6 +81,19 @@ struct cpu_type *identify_cpu(u32 ver)return NULL ; } +int probecpu (void ) +{ +uint svr; +uint ver; + + svr =get_svr ();cpu/mpc85xx/cpu.c struct cpu_type *identify_cpu(u32 ver) · line 99
Quoted 10 lines
cpu/mpc85xx/cpu.c +7
-0+ ver =SVR_SOC_VER (svr); + + gd->cpu =identify_cpu (ver); + +return 0 ; +} +int checkcpu (void ) {sys_info_t sysinfo;got a warning about cpu not being used anymore
Quoted 4 lines
cpu/mpc85xx/cpu.c +0
-0@@ -100,23 +113,30 @@ int checkcpu (void)int i;cpu/mpc85xx/cpu.c int checkcpu (void) · line 111
Quoted 10 lines
cpu/mpc85xx/cpu.c +0
-3svr =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);
cpu/mpc85xx/cpu.c int checkcpu (void) · line 137
Quoted 10 lines
cpu/mpc85xx/cpu.c +7
-3-printf ("CPU%d: " , pic->whoami); -#else -puts ("CPU: " ); +#ifndef CONFIG_MP +if (gd->cpu->num_cores >1 ) +puts ("#############################################\n" +"The system is detected to be MULTICORE,\n" +"but u-boot is built with UNI-CORE\n" + "To enable mutlticore Build set CONFIG_MP\n" +"#############################################\n\n");
cpu/mpc85xx/cpu.c int checkcpu (void)
Quoted 7 lines
cpu/mpc85xx/cpu.c +2
-3#endif - cpu =identify_cpu (ver); -if (cpu) { -puts (cpu->name); +if (gd->cpu->num_cores >1 ) { + volatile ccsr_pic_t *pic = (void*)(CONFIG_SYS_MPC85xx_PIC_ADDR);
Quoted 24 lines
cpu/mpc85xx/cpu.c +8
-1+printf ("CPU%d: " , pic->whoami); + } +else +puts ("CPU: " ); + +if (gd->cpu->name) { +puts (gd->cpu->name);if (IS_E_PROCESSOR (svr))puts ("E" );@@ -150,7 +170,7 @@ int checkcpu (void)get_sys_info (&sysinfo);puts ("Clock Configuration:" ); -for (i =0 ; i <CONFIG_NUM_CPUS ; i++) { +for (i =0 ; i < gd->cpu->num_cores; i++) {if (!(i &3 ))printf ("\n " ); printf("CPU%d:%-4s MHz, ",cpu/mpc85xx/mp.c +0
-0cpu/mpc85xx/mp.c line 2
Quoted 3 lines
cpu/mpc85xx/mp.c +1
-1@@ -1,5 +1,5 @@/* -* Copyright 2008 Freescale Semiconductor. +* Copyright (C) 2008-2009 Freescale Semiconductor, Inc. All rights
Quoted 14 lines
reserved.
*
* See file CREDITS for list of people who contributed to this
* project.cpu/mpc85xx/mp.c +1
-1@@ -157,7 +157,7 @@ static void pq3_mp_up(unsigned long bootpg)out_be32 (&gur->devdisr, devdisr);/* release the hounds */ - up = ((1 <<CONFIG_NUM_CPUS ) -1 ); + up = ((1 << gd->cpu->num_cores) -1 ); bpcr =in_be32 (&ecm->eebpcr); bpcr |= (up <<24 );out_be32 (&ecm->eebpcr, bpcr);cpu/mpc85xx/mp.c static void pq3_mp_up(unsigned long bootpg) · line 171
Quoted 6 lines
cpu/mpc85xx/mp.c +1
-1@@ -167,7 +167,7 @@ static void pq3_mp_up(unsigned long bootpg)/* wait for everyone */ while (timeout) {int i; -for (i =0 ; i <CONFIG_NUM_CPUS ; i++) { +for (i =0 ; i < gd->cpu->num_cores; i++) { if (table[i * NUM_BOOT_ENTRY +
BOOT_ENTRY_ADDR_LOWER])cpu/mpc85xx/release.S line 2
Quoted 9 lines
cpu/mpc85xx/mp.c +0
-0cpu_up_mask |= (1 << i); };cpu/mpc85xx/release.S +2
-0@@ -1,3 +1,26 @@ +/* + * Copyright (C) 2008-2009 Freescale Semiconductor, Inc.All rights
Quoted 9 lines
reserved.
+ * Kumar Gala <[email protected]>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 ofQuoted 8 lines
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU GeneralPublic License
Quoted 22 lines
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
#include <config.h>
#include <mpc85xx.h>
#include <version.h>cpu/mpc85xx/release.S +0
-0@@ -203,7 +226,7 @@ __secondary_start_page: .align L1_CACHE_SHIFT .globl __spin_table
__spin_table:cpu/mpc85xx/release.S +1
-1- .space CONFIG_NUM_CPUS*ENTRY_SIZE + .space CONFIG_MAX_CPUS*ENTRY_SIZE/* Fill in the empty space. The actual reset vector is * the last word of the page */cpu/mpc85xx/speed.c +0
-0cpu/mpc85xx/speed.c line 2
Quoted 3 lines
cpu/mpc85xx/speed.c +1
-1@@ -1,5 +1,5 @@/* -* Copyright 2004, 2007-2009 Freescale Semiconductor Inc. +* Copyright (C) 2004, 2007-2009 Freescale Semiconductor, Inc. All
cpu/mpc85xx/speed.c void get_sys_info (sys_info_t * sysInfo) · line 56
Quoted 12 lines
rights reserved.
* (C) Copyright 2003 Motorola Inc.
* Xianghua Xiao, (X.Xiao at motorola.com)
*cpu/mpc85xx/speed.c +1
-1@@ -51,7 +51,7 @@ void get_sys_info (sys_info_t * sysInfo)/* Divide before multiply to avoid integer * overflow for processor speeds above 2GHz */ half_freqSystemBus = sysInfo->freqSystemBus/2 ; -for (i =0 ; i <CONFIG_NUM_CPUS ; i++) { +for (i =0 ; i < gd->cpu->num_cores; i++) { e500_ratio = ((gur->porpllsr) >> (i *8 +16 )) &0x3f ; sysInfo->freqProcessor[i] = e500_ratio *
half_freqSystemBus;include/asm-ppc/config.h line 32
Quoted 10 lines
cpu/mpc85xx/speed.c +0
-0}include/asm-ppc/config.h +1
-0@@ -29,4 +29,5 @@#endif #endif +#define CONFIG_MAX_CPUS 8Let's be a bit smarter w/this.
#if
defined(CONFIG_MPC8572)
#defineCONFIG_MAX_CPUS2
#elifdefined(CONFIG_MPC8641)
#defineCONFIG_MAX_CPUS2
...Quoted 14 lines
include/asm-ppc/config.h +0
-0#endif include/asm-ppc/ renamed from include/asm-ppc/global_data.h +0
-0
global_data.h
index 244c161..2fac9a3 100644include/asm-ppc/global_data.h +1
-0@@ -1,4 +1,5 @@/* +* Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved.
* (C) Copyright 2002
* Wolfgang Denk, DENX Software Engineering, wd at denx.de. *include/asm-ppc/global_data.h line 29
Quoted 4 lines
include/asm-ppc/global_data.h +1
-0@@ -25,6 +26,7 @@#define __ASM_GBL_DATA_H#include "asm/types.h" +#include "asm/processor.h" don't include
asm/processor.hhere, just do something like:struct
cpu_type;since we just have a pointer to it we don't need to expose all of asm/
processor.hto everything.Quoted 15 lines
include/asm-ppc/global_data.h +3
-0/* * The following data structure is placed in some memory wich is @@ -92,6 +94,9 @@ typedef struct global_data {#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)u32 lbc_clk;#endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */ +#if defined(CONFIG_MPC85xx) +struct cpu_type *cpu; +#endif #if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)u32 i2c1_clk;u32 i2c2_clk;Review
Quoted 1 line
(quoted diff) +0
-0
b/include/asm-ppc/processor.hinclude/common.h void ppcDWstore(unsigned int
Quoted 25 lines
index e7db1c6..649d8b3 100644
include/asm-ppc/processor.h +3
-2@@ -1017,13 +1017,14 @@ n:struct cpu_type {char name[15 ];u32 soc_ver; +u32 num_cores; };struct cpu_type *identify_cpu (u32 ver);#if defined(CONFIG_MPC85xx) -#define CPU_TYPE_ENTRY (n, v) \ - { .name = #n, .soc_ver = SVR_##v, } +#define CPU_TYPE_ENTRY (n, v, nc) \ + { .name = #n, .soc_ver = SVR_##v, .num_cores = (nc), }#else #if defined(CONFIG_MPC83xx)#define CPU_TYPE_ENTRY (x) {#x, SPR_##x}include/common.h +0
-0@@ -439,6 +439,7 @@ void ppcDWstore(unsigned int*addr, unsigned
Quoted 47 lines
include/common.h +1
-0int *value);#endif /* $(CPU)/cpu.c */ +int probecpu (void );int checkcpu (void );int checkicache (void );int checkdcache (void);
include/e500.h +0
-4@@ -8,13 +8,9 @@#ifndef __ASSEMBLY__ -#ifndef CONFIG_NUM_CPUS -#define CONFIG_NUM_CPUS 1 -#endif -typedef struct
{include/e500.h +1
-1-unsigned long freqProcessor[CONFIG_NUM_CPUS ]; +unsigned long freqProcessor[CONFIG_MAX_CPUS ];unsigned long freqSystemBus;unsigned long freqDDRBus;unsigned long freqLocalBus;lib_ppc/board.c +3
-1@@ -290,7 +290,9 @@ init_fnc_t *init_sequence[] = {#if defined(CONFIG_BOARD_EARLY_INIT_F ) board_early_init_f,#endif - +#if defined(CONFIG_MPC85xx) + probecpu, +#endif #if !defined(CONFIG_8xx_CPUCLK_DEFAULT) get_clocks, /* get CPU and bus clocks (etc.) */#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M ) \lib_ppc/bootm.c +0
-0lib_ppc/bootm.c void arch_lmb_reserve(struct lmb *lmb) · line 174
Quoted 6 lines
lib_ppc/bootm.c +1
-1@@ -170,11 +170,12 @@ void arch_lmb_reserve(struct lmb *lmb)static void boot_prep_linux (void ) { -#if (CONFIG_NUM_CPUS >1 ) +#ifdef CONFIG_MP /* if we are MP make sure to flush the dcache() to any changes are
Quoted 15 lines
made
* visibile to all other cores */ flush_dcache(); #endif + return ; }Signature · 6 lines
1.5.6.3 _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
PATCH 4/5 P2020RDB Removed CONFIG_NUM_CPUS for 85xx processor series.
In reply to Poonam AggrwalQuoted 6 lines · Poonam Aggrwal
Instead the num of cores is determined dynamically by reading the SVR values. This can help to use the same u-boot image across the platforms.
Added
CONFIG_MAX_CPUSvalue 8.Also revamped and corrected few Freescale Copyright messages.
The remaining, unused references to CONFIG_NUM_CPUS should also be removed from 85xx board config files to prevent confusion down the road:include/configs/MPC8572DS.hinclude/configs/P2020DS.hinclude/configs/XPEDITE5370.h
Best,
Peter
PATCH 4/5 P2020RDB Removed CONFIG_NUM_CPUS for 85xx processor series.
Quoted 17 lines
-----Original Message-----
From: Peter Tyser [mailto:ptyser at xes-inc.com]
Sent: Thursday, July 02, 2009 7:47 PM
To: Aggrwal Poonam-B10812
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 4/5]P2020RDB RemovedCONFIG_NUM_CPUSfor 85xx processor series.Quoted 1 line · Poonam Aggrwal
Instead the num of cores is determined dynamically by
reading the SVR values.
Quoted 4 lines
This can help to use the same u-boot image across the platforms.
Added
CONFIG_MAX_CPUSvalue 8.
Quoted 8 lines
Quoted 1 line
Also revamped and corrected few Freescale Copyright messages.
The remaining, unused references to
CONFIG_NUM_CPUSshould also be removed from 85xx board config files to prevent confusion down the road:include/configs/MPC8572DS.hinclude/configs/P2020DS.hinclude/configs/XPEDITE5370.h
Thanks for the comment, shall do it.
Regards
Poonam
Quoted 5 lines
Best,
Peter