diff options
author | Biju Das <biju.das.jz@bp.renesas.com> | 2023-04-12 16:50:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-20 13:47:33 +0200 |
commit | f06c2a9000ebecbb461196e59ce063f742272902 (patch) | |
tree | 2776e87cb563c35e161db7e0e2e68b8944360de9 /drivers/tty | |
parent | tty: serial: sh-sci: Add support for tx end interrupt handling (diff) | |
download | linux-f06c2a9000ebecbb461196e59ce063f742272902.tar.xz linux-f06c2a9000ebecbb461196e59ce063f742272902.zip |
tty: serial: sh-sci: Fix end of transmission on SCI
We need to set TE to "0" (i.e., disable serial transmission) to
get the expected behavior of the end of serial transmission.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230412145053.114847-6-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 5c9ae69c0555..7c9457962a3d 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -847,6 +847,11 @@ static void sci_transmit_chars(struct uart_port *port) } else if (!uart_circ_empty(xmit) && !stopped) { c = xmit->buf[xmit->tail]; xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); + } else if (port->type == PORT_SCI && uart_circ_empty(xmit)) { + ctrl = serial_port_in(port, SCSCR); + ctrl &= ~SCSCR_TE; + serial_port_out(port, SCSCR, ctrl); + return; } else { break; } |