Skip to content
Snippets Groups Projects
Commit 6f57c344 authored by Simon Goldschmidt's avatar Simon Goldschmidt Committed by Simon Glass
Browse files

serial: ns16550: fix debug uart putc called before init


If _debug_uart_putc() is called before _debug_uart_init(), the
ns16550 debug uart driver hangs in a tight loop waiting for the
tx FIFO to get empty.

As this can happen via a printf sneaking in before the port calls
debug_uart_init(), let's rather ignore characters before the debug
uart is initialized.

This is done by reading the baudrate divisor and aborting if is zero.

Tested on socfpga_cyclone5_socrates.

Signed-off-by: default avatarSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 81f351d6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment