boot: Call flush() before booting

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>
This commit is contained in:
Pali Rohár 2022-09-05 11:31:21 +02:00 committed by Tom Rini
parent 989cc40f80
commit efc3f9526f
3 changed files with 4 additions and 0 deletions

View File

@ -303,6 +303,7 @@ static void do_bootvx_fdt(bootm_headers_t *images)
#else #else
printf("## Starting vxWorks at 0x%08lx\n", (ulong)images->ep); printf("## Starting vxWorks at 0x%08lx\n", (ulong)images->ep);
#endif #endif
flush();
boot_jump_vxworks(images); boot_jump_vxworks(images);

View File

@ -32,6 +32,7 @@ static int do_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
addr = hextoul(argv[1], NULL); addr = hextoul(argv[1], NULL);
printf ("## Starting application at 0x%08lX ...\n", addr); printf ("## Starting application at 0x%08lX ...\n", addr);
flush();
/* /*
* pass address parameter as argv[0] (aka command name), * pass address parameter as argv[0] (aka command name),

View File

@ -72,6 +72,7 @@ int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return rcode; return rcode;
printf("## Starting application at 0x%08lx ...\n", addr); printf("## Starting application at 0x%08lx ...\n", addr);
flush();
/* /*
* pass address parameter as argv[0] (aka command name), * 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"); puts("## Not an ELF image, assuming binary\n");
printf("## Starting vxWorks at 0x%08lx ...\n", addr); printf("## Starting vxWorks at 0x%08lx ...\n", addr);
flush();
dcache_disable(); dcache_disable();
#if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI) #if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI)