summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2020-09-30 15:24:51 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-10-02 06:21:53 +0200
commitcac4e34f2da46798d77907ebcd4c11c770ed0f13 (patch)
tree8f6213edd07681d660eae4f4d906c77f72e0c2e6 /common
parent09bc528b763c7fe48aa2855f1229cff901b7f9d2 (diff)
downloadbarebox-cac4e34f2da46798d77907ebcd4c11c770ed0f13.tar.gz
barebox-cac4e34f2da46798d77907ebcd4c11c770ed0f13.tar.xz
shutdown: flush console on barebox shutdown
Same as in the poweroff and restart path, we should make sure to properly drain the console devices when shutting down barebox. This fixes serial console corruption when the software running after barebox changes the peripheral configuration before all the characters have drained out of the FIFO. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/startup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/startup.c b/common/startup.c
index ea7ce6b8da..60d1102edf 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -436,6 +436,8 @@ void shutdown_barebox(void)
pr_debug("exitcall-> %pS\n", *exitcall);
(*exitcall)();
}
+
+ console_flush();
}
BAREBOX_MAGICVAR_NAMED(autoboot_state,