[U-Boot] [PATCH 2/6] arm: remove cpu_init

Dirk Behme dirk.behme at googlemail.com
Sun May 10 09:42:36 CEST 2009


Jean-Christophe PLAGNIOL-VILLARD wrote:
> move s3c44b0 to arch_cpu_init and as noone use cpu_init remove it
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>

Cortex-A8 (OMAP3) part

Acked-by: Dirk Behme <dirk.behme at googlemail.com>

Just a minor _question_ for an other board below:

> diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cpu.c
> index 7ef4a1f..bca38f8 100644
> --- a/cpu/s3c44b0/cpu.c
> +++ b/cpu/s3c44b0/cpu.c
> @@ -32,7 +32,7 @@
>  #include <command.h>
>  #include <asm/hardware.h>
>  
> -int cpu_init (void)
> +int arch_cpu_init (void)
>  {
>  	icache_enable();
>  

Would encapsulating this new arch_cpu_init() with an additional 
CONFIG_ARCH_CPU_INIT, e.g.

#if defined(CONFIG_ARCH_CPU_INIT)
int arch_cpu_init (void)
{

(like below) help to avoid issues if cpu/s3c44b0/cpu.c would be 
compiled without CONFIG_ARCH_CPU_INIT enabled?

> diff --git a/include/configs/B2.h b/include/configs/B2.h
> index 35fad5c..e5439f3 100644
> --- a/include/configs/B2.h
> +++ b/include/configs/B2.h
> @@ -39,6 +39,7 @@
>  #define CONFIG_ARM_THUMB	1	/* this is an ARM7TDMI */
>  #undef  CONFIG_ARM7_REVD		/* disable ARM720 REV.D Workarounds */
>  #define CONFIG_SYS_NO_CP15_CACHE
> +#define CONFIG_ARCH_CPU_INIT
>  
>  #define CONFIG_S3C44B0_CLOCK_SPEED	75 /* we have a 75Mhz S3C44B0*/
>  
> diff --git a/lib_arm/board.c b/lib_arm/board.c
> index 344120f..452b177 100644
> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -265,7 +265,6 @@ typedef int (init_fnc_t) (void);
>  int print_cpuinfo (void);
>  
>  init_fnc_t *init_sequence[] = {
> -	cpu_init,		/* basic cpu dependent setup */
>  #if defined(CONFIG_ARCH_CPU_INIT)
>  	arch_cpu_init,		/* basic arch cpu dependent setup */
>  #endif



More information about the U-Boot mailing list