[PATCH] shutdown: flush console on barebox shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 common/startup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/startup.c b/common/startup.c
index 1c58e412885f..7d44123941da 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -418,6 +418,8 @@ void shutdown_barebox(void)
 		pr_debug("exitcall-> %pS\n", *exitcall);
 		(*exitcall)();
 	}
+
+	console_flush();
 }
 
 BAREBOX_MAGICVAR_NAMED(autoboot_state,
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux