x86: spl: Use hang() instead of a while() loop
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:11:38 +0000 (08:11 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:57:35 +0000 (13:57 +0800)
Use the standard hang() function when booting fails since this implements
the defined U-Boot behaviour for this situation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/spl.c
arch/x86/lib/tpl.c

index 5d5d1a9ca749d9ad4acc1b83f27af4892034631e..01a96d294bb6c30edd4fee2011826e0400e5b8c9 100644 (file)
@@ -183,8 +183,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
        printf("Jumping to 64-bit U-Boot: Note many features are missing\n");
        ret = cpu_jump_to_64bit_uboot(spl_image->entry_point);
        debug("ret=%d\n", ret);
-       while (1)
-               ;
+       hang();
 }
 #endif
 
index 492a2d65216db3a8a895aba2110c26bd16f4404d..3e662a8bdafcb5e51f3f38c28371df20011cf67e 100644 (file)
@@ -108,8 +108,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
 {
        printf("Jumping to U-Boot SPL at %lx\n", (ulong)spl_image->entry_point);
        jump_to_spl(spl_image->entry_point);
-       while (1)
-               ;
+       hang();
 }
 
 void spl_board_init(void)