devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: serial: snps-dw-apb-uart: Add property to drain TX FIFO
@ 2023-10-16  1:32 Richard Laing
  2023-10-16  1:32 ` [PATCH] serial: 8250_dw: Allow TX FIFO to drain before writing to UART_LCR An issue has been observed on the Broadcom BCM56160 serial port which appears closely related to a similar issue on the Marvell Armada 38x serial port Richard Laing
  2023-10-16  1:32 ` [PATCH] dt-bindings: serial: snps-dw-apb-uart: Add property to drain TX FIFO Richard Laing
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Laing @ 2023-10-16  1:32 UTC (permalink / raw)
  To: gregkh, jirislaby, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	ilpo.jarvinen, andriy.shevchenko
  Cc: linux-kernel, linux-serial, devicetree, Richard Laing

During development of a new hardware an issue was seen where writes to
UART_LCR can result in characters that are currently held in the TX FIFO
being lost rather than sent, even if the userspace process has attempted to
flush them.

This is most visible when using the "resize" command (tested on Busybox),
where we have observed the escape code for restoring cursor position
becoming mangled.

This is the same issue as addressed in 
commit 914eaf935ec7 ("serial: 8250_dw: Allow TX FIFO to drain before
writing to UART_LCR") 

for the Armada 38x serial port. This patch makes the fix more generic
allowing it to be applied on any similar UART.

Richard Laing (2):
  serial: 8250_dw: Allow TX FIFO to drain before writing to UART_LCR An
    issue has been observed on the Broadcom BCM56160 serial port which
    appears closely related to a similar issue on the Marvell Armada 38x
    serial port.
  dt-bindings: serial: snps-dw-apb-uart: Add property to drain TX FIFO

 .../bindings/serial/snps-dw-apb-uart.yaml      |  6 ++++++
 drivers/tty/serial/8250/8250_dw.c              | 18 ++++++++++++++++++
 drivers/tty/serial/8250/8250_dwlib.h           |  1 +
 3 files changed, 25 insertions(+)

-- 
2.42.0


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

end of thread, other threads:[~2023-10-16 12:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16  1:32 [PATCH] dt-bindings: serial: snps-dw-apb-uart: Add property to drain TX FIFO Richard Laing
2023-10-16  1:32 ` [PATCH] serial: 8250_dw: Allow TX FIFO to drain before writing to UART_LCR An issue has been observed on the Broadcom BCM56160 serial port which appears closely related to a similar issue on the Marvell Armada 38x serial port Richard Laing
2023-10-16 12:13   ` Ilpo Järvinen
2023-10-16 12:20     ` Ilpo Järvinen
2023-10-16  1:32 ` [PATCH] dt-bindings: serial: snps-dw-apb-uart: Add property to drain TX FIFO Richard Laing
2023-10-16  2:19   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).