]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[uart] Wait for 16550 UART to become idle before modifying LCR
authorMichael Brown <mcb30@ipxe.org>
Mon, 23 Jun 2025 21:37:32 +0000 (22:37 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 23 Jun 2025 21:56:09 +0000 (22:56 +0100)
commit0ed1dea7f4f5c5b2b7cd0130eb49c2c5c0b0ea42
tree78dec217b92330529f5467d9ea992bb1daddf021
parent2ce1b185b239b220cc6c1847f7014df83b1a8862
[uart] Wait for 16550 UART to become idle before modifying LCR

Some implementations of 16550-compatible UARTs (e.g. the DesignWare
UART) are known to ignore writes to the line control register while
the transmitter is active.

Wait for the transmitter to become empty before attempting to write to
the line control register.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/uart/ns16550.c