]> git.sur5r.net Git - u-boot/commitdiff
ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 1 Mar 2012 04:02:38 +0000 (04:02 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 20 Jul 2012 12:24:08 +0000 (14:24 +0200)
Create a weak-aliased arch_cpu_init, so that we can get rid of CONFIG_ARCH_CPU_INIT
and always call arch_cpu_init.

This way we do not need to define CONFIG_ARCH_CPU_INIT in every board file, since
arch_cpu_init() is supposed to handle common CPU level code.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
arch/arm/lib/board.c

index f21591dc6ab64ef8dc38d1b5aaeb130d7de34518..f1951e883e183c73558403ae2ed959fce3063fca 100644 (file)
@@ -224,10 +224,16 @@ void __dram_init_banksize(void)
 void dram_init_banksize(void)
        __attribute__((weak, alias("__dram_init_banksize")));
 
+int __arch_cpu_init(void)
+{
+       return 0;
+}
+int arch_cpu_init(void)
+       __attribute__((weak, alias("__arch_cpu_init")));
+
 init_fnc_t *init_sequence[] = {
-#if defined(CONFIG_ARCH_CPU_INIT)
        arch_cpu_init,          /* basic arch cpu dependent setup */
-#endif
+
 #if defined(CONFIG_BOARD_EARLY_INIT_F)
        board_early_init_f,
 #endif