Skip to content
Snippets Groups Projects
Commit cb55b332 authored by Scott Wood's avatar Scott Wood
Browse files

serial/ns16550: wait for TEMT before initializing


TEMT is set when the transmitter is totally empty and all output has
finished.

This prevents output problems (including a loss of synchronization
observed on p2020 that persisted for quite a while) if SPL has output
still on its way out.

Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
--
v2: fixed typo in subject, and explained what the bit does in the changelog
parent 48cbc3a8
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
void NS16550_init(NS16550_t com_port, int baud_divisor) void NS16550_init(NS16550_t com_port, int baud_divisor)
{ {
while (!(serial_in(&com_port->lsr) & UART_LSR_TEMT))
;
serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
#if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \ #if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \
defined(CONFIG_AM33XX) defined(CONFIG_AM33XX)
......
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