]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: fsp: Only FSP2 has INIT_PHASE_END_FIRMWARE
authorBin Meng <bmeng.cn@gmail.com>
Mon, 2 Aug 2021 09:45:22 +0000 (17:45 +0800)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 2 Aug 2021 16:01:38 +0000 (00:01 +0800)
For FSP1, there is no such INIT_PHASE_END_FIRMWARE.

Move board_final_cleanup() to fsp2 directory.

Fixes: 7c73cea44290 ("x86: Notify the FSP of the 'end firmware' event")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax
Tested-by: Simon Glass <sjg@chromium.org>
arch/x86/lib/fsp/fsp_common.c
arch/x86/lib/fsp2/fsp_common.c

index 6365b0a50a72f4d3632fafa733ac3f83ec45c1bb..82f7d3ab5f0d3330e3c6fe648297b3c647055706 100644 (file)
@@ -61,22 +61,6 @@ void board_final_init(void)
                debug("OK\n");
 }
 
-void board_final_cleanup(void)
-{
-       u32 status;
-
-       /* TODO(sjg@chromium.org): This causes Linux to crash */
-       return;
-
-       /* call into FspNotify */
-       debug("Calling into FSP (notify phase INIT_PHASE_END_FIRMWARE): ");
-       status = fsp_notify(NULL, INIT_PHASE_END_FIRMWARE);
-       if (status)
-               debug("fail, error code %x\n", status);
-       else
-               debug("OK\n");
-}
-
 int fsp_save_s3_stack(void)
 {
        struct udevice *dev;
index f69456e43a27bd3cae6eaf8303131b3a061dcafc..20c3f6406adf08386d3a23592d8fc9dedf24fc95 100644 (file)
@@ -6,8 +6,25 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/fsp/fsp_support.h>
 
 int arch_fsp_init(void)
 {
        return 0;
 }
+
+void board_final_cleanup(void)
+{
+       u32 status;
+
+       /* TODO(sjg@chromium.org): This causes Linux to crash */
+       return;
+
+       /* call into FspNotify */
+       debug("Calling into FSP (notify phase INIT_PHASE_END_FIRMWARE): ");
+       status = fsp_notify(NULL, INIT_PHASE_END_FIRMWARE);
+       if (status)
+               debug("fail, error code %x\n", status);
+       else
+               debug("OK\n");
+}