mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] shutdown: flush console on barebox shutdown
@ 2020-09-30 13:24 Lucas Stach
  2020-10-02  4:22 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2020-09-30 13:24 UTC (permalink / raw)
  To: barebox

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>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] shutdown: flush console on barebox shutdown
  2020-09-30 13:24 [PATCH] shutdown: flush console on barebox shutdown Lucas Stach
@ 2020-10-02  4:22 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-10-02  4:22 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Wed, Sep 30, 2020 at 03:24:51PM +0200, Lucas Stach wrote:
> 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>
> ---
>  common/startup.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied, thanks

Sascha

> 
> 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@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-02  4:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 13:24 [PATCH] shutdown: flush console on barebox shutdown Lucas Stach
2020-10-02  4:22 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox