Message ID | 20200614215726.v1.42.I2762a08266cb540453f944c69ce0031ad0fe7c05@changeid |
---|---|
State | Accepted |
Commit | 4021ee63882dcfd6dc348ca6dd7dd8f370abef35 |
Headers | show |
Series | x86: Programmatic generation of ACPI tables (Part C) | expand |
Hi Simon, -----"Simon Glass" <sjg at chromium.org> schrieb: ----- > Betreff: [PATCH v1 42/43] x86: Rename board_final_cleanup() to board_final_init() > > This function sounds like something that is called when U-Boot is about to > jump to Linux. In fact it is an init function. > > Rename it to reduce confusion. > > Signed-off-by: Simon Glass <sjg at chromium.org> > --- > > arch/x86/cpu/coreboot/coreboot.c | 4 ++-- > arch/x86/cpu/cpu.c | 8 ++++---- > arch/x86/cpu/efi/app.c | 2 +- > arch/x86/cpu/quark/quark.c | 2 +- > arch/x86/lib/fsp/fsp_common.c | 2 +- > 5 files changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
On Mon, Jun 15, 2020 at 11:58 AM Simon Glass <sjg at chromium.org> wrote: > > This function sounds like something that is called when U-Boot is about to > jump to Linux. In fact it is an init function. > > Rename it to reduce confusion. > > Signed-off-by: Simon Glass <sjg at chromium.org> > --- > > arch/x86/cpu/coreboot/coreboot.c | 4 ++-- > arch/x86/cpu/cpu.c | 8 ++++---- > arch/x86/cpu/efi/app.c | 2 +- > arch/x86/cpu/quark/quark.c | 2 +- > arch/x86/lib/fsp/fsp_common.c | 2 +- > 5 files changed, 9 insertions(+), 9 deletions(-) > Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index d44db1347b..22a93254a9 100644 --- a/arch/x86/cpu/coreboot/coreboot.c +++ b/arch/x86/cpu/coreboot/coreboot.c @@ -42,7 +42,7 @@ int print_cpuinfo(void) return default_print_cpuinfo(); } -static void board_final_cleanup(void) +static void board_final_init(void) { /* * Un-cache the ROM so the kernel has one @@ -80,7 +80,7 @@ int last_stage_init(void) if (CONFIG_IS_ENABLED(USB_KEYBOARD)) usb_init(); - board_final_cleanup(); + board_final_init(); return 0; } diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 9bc243ebc8..69c14189d1 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -182,10 +182,10 @@ void show_boot_progress(int val) #if !defined(CONFIG_SYS_COREBOOT) && !defined(CONFIG_EFI_STUB) /* - * Implement a weak default function for boards that optionally - * need to clean up the system before jumping to the kernel. + * Implement a weak default function for boards that need to do some final init + * before the system is ready. */ -__weak void board_final_cleanup(void) +__weak void board_final_init(void) { } @@ -193,7 +193,7 @@ int last_stage_init(void) { struct acpi_fadt __maybe_unused *fadt; - board_final_cleanup(); + board_final_init(); if (IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)) { fadt = acpi_find_fadt(); diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c index 10677ecbc2..f754489784 100644 --- a/arch/x86/cpu/efi/app.c +++ b/arch/x86/cpu/efi/app.c @@ -24,7 +24,7 @@ int print_cpuinfo(void) return default_print_cpuinfo(); } -void board_final_cleanup(void) +void board_final_init(void) { } diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index ddad02e375..30b4711b9a 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -363,7 +363,7 @@ int arch_misc_init(void) return 0; } -void board_final_cleanup(void) +void board_final_init(void) { struct quark_rcba *rcba; u32 base, val; diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index 8e3082d4c8..ea52954725 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -47,7 +47,7 @@ int fsp_init_phase_pci(void) return status ? -EPERM : 0; } -void board_final_cleanup(void) +void board_final_init(void) { u32 status;
This function sounds like something that is called when U-Boot is about to jump to Linux. In fact it is an init function. Rename it to reduce confusion. Signed-off-by: Simon Glass <sjg at chromium.org> --- arch/x86/cpu/coreboot/coreboot.c | 4 ++-- arch/x86/cpu/cpu.c | 8 ++++---- arch/x86/cpu/efi/app.c | 2 +- arch/x86/cpu/quark/quark.c | 2 +- arch/x86/lib/fsp/fsp_common.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-)