diff options
author | Pali Rohár <pali@kernel.org> | 2022-09-05 11:31:21 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-24 10:47:01 -0400 |
commit | c176dc2a4ea32900c994853a9f841a753bd84cad (patch) | |
tree | b9be1e9b1716555803c0ffef17b358c76bf8f4d1 | |
parent | 16e218160c30a458823b41773a8081e766b8eeea (diff) | |
download | u-boot-WIP/2022-09-24-add-console-flush.zip u-boot-WIP/2022-09-24-add-console-flush.tar.gz u-boot-WIP/2022-09-24-add-console-flush.tar.bz2 |
boot: Call flush() before bootingWIP/2022-09-24-add-console-flush
In a lot of cases kernel resets UART HW. To ensure that U-Boot messages
printed before booting the kernel are not lost, call new U-Boot console
flush() function.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | boot/bootm_os.c | 1 | ||||
-rw-r--r-- | cmd/boot.c | 1 | ||||
-rw-r--r-- | cmd/elf.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/boot/bootm_os.c b/boot/bootm_os.c index f31820c..079224c 100644 --- a/boot/bootm_os.c +++ b/boot/bootm_os.c @@ -303,6 +303,7 @@ static void do_bootvx_fdt(bootm_headers_t *images) #else printf("## Starting vxWorks at 0x%08lx\n", (ulong)images->ep); #endif + flush(); boot_jump_vxworks(images); @@ -32,6 +32,7 @@ static int do_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) addr = hextoul(argv[1], NULL); printf ("## Starting application at 0x%08lX ...\n", addr); + flush(); /* * pass address parameter as argv[0] (aka command name), @@ -72,6 +72,7 @@ int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return rcode; printf("## Starting application at 0x%08lx ...\n", addr); + flush(); /* * pass address parameter as argv[0] (aka command name), @@ -274,6 +275,7 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) puts("## Not an ELF image, assuming binary\n"); printf("## Starting vxWorks at 0x%08lx ...\n", addr); + flush(); dcache_disable(); #if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI) |