Message ID | 1415305231-30180-15-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
On Fri, Nov 7, 2014 at 4:20 AM, Simon Glass <sjg@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@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@chromium.org): remove */ > # ifdef CONFIG_OF_CONTROL > find_fdt, /* TODO(sjg@chromium.org): remove */ > # endif > -- Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
On 7 November 2014 02:49, Bin Meng <bmeng.cn@gmail.com> wrote: > On Fri, Nov 7, 2014 at 4:20 AM, Simon Glass <sjg@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@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@chromium.org): remove */ >> # ifdef CONFIG_OF_CONTROL >> find_fdt, /* TODO(sjg@chromium.org): remove */ >> # endif >> -- > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Applied to u-boot-x86.
Hi, On 8 November 2014 12:40, Simon Glass <sjg@chromium.org> wrote: > On 7 November 2014 02:49, Bin Meng <bmeng.cn@gmail.com> wrote: >> On Fri, Nov 7, 2014 at 4:20 AM, Simon Glass <sjg@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@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@chromium.org): remove */ >>> # ifdef CONFIG_OF_CONTROL >>> find_fdt, /* TODO(sjg@chromium.org): remove */ >>> # endif >>> -- >> >> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> > > Applied to u-boot-x86. Unfortunately this conflicts with your patch Bin, in that cpu_init_f() is actually still needed. I tweaked this to call cpu_init_f() from arch_cpu_init() and that seems to work. We'll have to deal with any problems with an additional patch. Regards, Simon
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@chromium.org): remove */ # ifdef CONFIG_OF_CONTROL find_fdt, /* TODO(sjg@chromium.org): remove */ # endif
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@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(-)