Skip to content

Commit

Permalink
serial: xilinx_uartps: unset STOPBRK when setting STARTBRK
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julien Malik authored and Greg Kroah-Hartman committed Oct 16, 2023
1 parent cee8e0c commit 1ed59c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/xilinx_uartps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1ed59c5

Please sign in to comment.