[U-Boot,15/22] x86: Adjust board_final_cleanup() order

Submitted by Bin Meng on March 16, 2017, 2:26 p.m.

Details

Message ID 1489674408-17498-16-git-send-email-bmeng.cn@gmail.com
State Superseded
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng March 16, 2017, 2:26 p.m.
Call board_final_cleanup() before write_tables(), so that anything
done in board_final_cleanup() on a normal boot path is also done
on an S3 resume path.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/x86/cpu/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass March 21, 2017, 8:07 p.m.
On 16 March 2017 at 08:26, Bin Meng <bmeng.cn@gmail.com> wrote:
> Call board_final_cleanup() before write_tables(), so that anything
> done in board_final_cleanup() on a normal boot path is also done
> on an S3 resume path.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/cpu/cpu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

Patch hide | download patch | download mbox

diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 9e2aee2..bd5aeb8 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -205,6 +205,8 @@  __weak void board_final_cleanup(void)
 
 int last_stage_init(void)
 {
+	board_final_cleanup();
+
 #if CONFIG_HAVE_ACPI_RESUME
 	void *wake_vector = acpi_find_wakeup_vector();
 
@@ -214,8 +216,6 @@  int last_stage_init(void)
 
 	write_tables();
 
-	board_final_cleanup();
-
 	return 0;
 }
 #endif