aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-09-05 11:31:21 +0200
committerTom Rini <trini@konsulko.com>2022-09-24 11:34:38 -0400
commitefc3f9526f9cfcd8614668c03b9c66b209782c41 (patch)
tree75203cc106a2c1c340024fdb562be7c9b6d0e4e2 /cmd
parent989cc40f806b68678e10203ec3b63d38d0fdd6eb (diff)
downloadu-boot-efc3f9526f9cfcd8614668c03b9c66b209782c41.zip
u-boot-efc3f9526f9cfcd8614668c03b9c66b209782c41.tar.gz
u-boot-efc3f9526f9cfcd8614668c03b9c66b209782c41.tar.bz2
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>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/boot.c1
-rw-r--r--cmd/elf.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/cmd/boot.c b/cmd/boot.c
index be67a59..14839c1 100644
--- a/cmd/boot.c
+++ b/cmd/boot.c
@@ -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),
diff --git a/cmd/elf.c b/cmd/elf.c
index ce40d3f..b7b9f50 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -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)