]> git.sur5r.net Git - u-boot/commitdiff
x86: Adjust board_final_cleanup() order
authorBin Meng <bmeng.cn@gmail.com>
Fri, 21 Apr 2017 14:24:41 +0000 (07:24 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 17 May 2017 09:11:46 +0000 (17:11 +0800)
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>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Roese <sr@denx.de>
arch/x86/cpu/cpu.c

index f86eaa9df2da9592d8b5dc9d3b74d66e30f1d0da..c9fc7e4ebf10aaa7a06400dfdd72b280522571b6 100644 (file)
@@ -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