]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
serial: xilinx_uartps: unset STOPBRK when setting STARTBRK
authorJulien Malik <julien.malik@unseenlabs.fr>
Sat, 24 Jun 2023 21:03:23 +0000 (23:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Oct 2023 18:14:42 +0000 (20:14 +0200)
Zynq UG585 states, in chapter B.33, for XUARTPS_CR_STARTBRK:
It can only be set if STPBRK (Stop transmitter break) is not high

This fixes tcsendbreak, which otherwise does not actually break.

Signed-Off-By: Julien Malik <julien.malik@unseenlabs.fr>
Link: https://lore.kernel.org/r/20230624210323.88455-1-julien.malik@unseenlabs.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c

index 9c13dac1d4d1d534cc61fc98337d99931d96c443..66a45a634158f6e75ebe0d93eb8ce295b76135a2 100644 (file)
@@ -657,7 +657,7 @@ static void cdns_uart_break_ctl(struct uart_port *port, int ctl)
        status = readl(port->membase + CDNS_UART_CR);
 
        if (ctl == -1)
-               writel(CDNS_UART_CR_STARTBRK | status,
+               writel(CDNS_UART_CR_STARTBRK | (~CDNS_UART_CR_STOPBRK & status),
                                port->membase + CDNS_UART_CR);
        else {
                if ((status & CDNS_UART_CR_STOPBRK) == 0)