[U-Boot] [PATCH 14/39] x86: Use the standard arch_cpu_init() function

Bin Meng bmeng.cn at gmail.com
Fri Nov 7 10:49:45 CET 2014


On Fri, Nov 7, 2014 at 4:20 AM, Simon Glass <sjg at chromium.org> wrote:
> 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 <sjg at chromium.org>
> ---
>
>  arch/x86/cpu/coreboot/coreboot.c  | 5 +----
>  arch/x86/cpu/cpu.c                | 1 -
>  arch/x86/include/asm/u-boot-x86.h | 1 +
>  common/board_f.c                  | 1 -
>  4 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
> index e24f13a..b640f35 100644
> --- a/arch/x86/cpu/coreboot/coreboot.c
> +++ b/arch/x86/cpu/coreboot/coreboot.c
> @@ -20,10 +20,7 @@
>
>  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)
> diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
> index 2e25253..d6ba246 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 89618c7..fdb8a6c 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 df02ca5..f81f70d 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -819,7 +819,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 at chromium.org): remove */
>  # ifdef CONFIG_OF_CONTROL
>         find_fdt,               /* TODO(sjg at chromium.org): remove */
>  # endif
> --

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list