[U-Boot] [PATCH 2/2]Removed CONFIG_NUM_CPUS for 85xx/86xx Freescale processors.

Wolfgang Denk wd at denx.de
Thu Jul 30 20:40:52 CEST 2009


Dear Poonam Aggrwal,

In message <1248832996-560-1-git-send-email-poonam.aggrwal at freescale.com> you wrote:
> 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 at freescale.com>
...
> +int probecpu (void)
> +{
> +	uint svr;
> +	uint ver;
> +
> +	svr = get_svr();
> +	ver = SVR_SOC_VER(svr);
> +
> +	gd->cpu = identify_cpu(ver);
> +
> +#ifndef CONFIG_MP
> +	if (cpu_numcores() > 1)
> +		puts("Unicore software on multiprocessor system!!\n"
> +			"To enable mutlticore Build set CONFIG_MP\n"

Please use braces for multi-line statements.

Why "Build" and not "build" ?

s/set/define/ ?

> --- a/include/asm-ppc/config.h
> +++ b/include/asm-ppc/config.h
> @@ -37,4 +37,22 @@
>  #endif
>  #endif
>  
> +#if defined(CONFIG_MPC8533) || defined(CONFIG_MPC8535) ||	\
> +	defined(CONFIG_MPC8536) || defined(CONFIG_MPC8540) ||	\
> +	defined(CONFIG_MPC8541) || defined(CONFIG_MPC8543) ||	\
> +	defined(CONFIG_MPC8544) || defined(CONFIG_MPC8545) ||	\
> +	defined(CONFIG_MPC8547) || defined(CONFIG_MPC8548) ||	\
> +	defined(CONFIG_MPC8555) || defined(CONFIG_MPC8560) ||	\
> +	defined(CONFIG_MPC8567) || defined(CONFIG_MPC8568) ||	\
> +	defined(CONFIG_MPC8569)

Instead of adding this long list we can make it eventually the default
case - i. e. catch only the MP processors here and have anything else
default to N=1 ?

> diff --git a/include/asm-ppc/global_data.h b/include/asm-ppc/global_data.h
> index 244c161..a5e9192 100644
> --- a/include/asm-ppc/global_data.h
> +++ b/include/asm-ppc/global_data.h
> @@ -92,6 +92,9 @@ typedef	struct	global_data {
>  #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
>  	u32 lbc_clk;
>  #endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */
> +#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
> +	void *cpu;
> +#endif

Seems the previous block was already a "85xx || 86xx"? Why not merge
the two?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Old programmers never die, they just become managers.


More information about the U-Boot mailing list