From: Simon Glass Date: Thu, 6 Nov 2014 20:20:06 +0000 (-0700) Subject: x86: Use the standard arch_cpu_init() function X-Git-Tag: v2015.01-rc2~5^2~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8b37c7694f1eace82626d00fbfb85311ebf0d220;p=u-boot x86: Use the standard arch_cpu_init() function Instead of an x86-specific cpu_init_f() function, use the normal U-Boot one for this purpose. Also remove a useless/misleading comment. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index e24f13afaf..4e1349f950 100644 --- a/arch/x86/cpu/coreboot/coreboot.c +++ b/arch/x86/cpu/coreboot/coreboot.c @@ -20,18 +20,17 @@ DECLARE_GLOBAL_DATA_PTR; -/* - * Miscellaneous platform dependent initializations - */ -int cpu_init_f(void) +int arch_cpu_init(void) { int ret = get_coreboot_info(&lib_sysinfo); - if (ret != 0) + if (ret != 0) { printf("Failed to parse coreboot tables.\n"); + return ret; + } timestamp_init(); - return ret; + return x86_cpu_init_f(); } int board_early_init_f(void) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 2e252532d6..d6ba246b6f 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -130,7 +130,6 @@ int x86_cpu_init_f(void) return 0; } -int cpu_init_f(void) __attribute__((weak, alias("x86_cpu_init_f"))); int x86_cpu_init_r(void) { diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index 89618c7f64..fdb8a6c9a3 100644 --- a/arch/x86/include/asm/u-boot-x86.h +++ b/arch/x86/include/asm/u-boot-x86.h @@ -9,6 +9,7 @@ #define _U_BOOT_I386_H_ 1 /* cpu/.../cpu.c */ +int arch_cpu_init(void); int x86_cpu_init_r(void); int cpu_init_r(void); int x86_cpu_init_f(void); diff --git a/common/board_f.c b/common/board_f.c index 1d81ed7c6a..23d8f6461a 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -818,7 +818,6 @@ static init_fnc_t init_sequence_f[] = { #endif arch_cpu_init, /* basic arch cpu dependent setup */ #ifdef CONFIG_X86 - cpu_init_f, /* TODO(sjg@chromium.org): remove */ # ifdef CONFIG_OF_CONTROL find_fdt, /* TODO(sjg@chromium.org): remove */ # endif