Skip to content

Commit 87c5cbf

Browse files
dangowrtgregkh
authored andcommitted
serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE
On AR934x this UART is usually not initialized by the bootloader as it is only used as a secondary serial port while the primary UART is a newly introduced NS16550-compatible. In order to make use of the ar933x-uart on AR934x without RTS/CTS hardware flow control, one needs to set the UART_CS_{RX,TX}_READY_ORIDE bits as other than on AR933x where this UART is used as primary/console, the bootloader on AR934x typically doesn't set those bits. Setting them explicitely on AR933x should not do any harm, so just set them unconditionally. Tested-by: Chuanhong Guo <[email protected]> Signed-off-by: Daniel Golle <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bb6d3fb commit 87c5cbf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/tty/serial/ar933x_uart.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ static void ar933x_uart_set_termios(struct uart_port *port,
286286
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
287287
AR933X_UART_CS_HOST_INT_EN);
288288

289+
/* enable RX and TX ready overide */
290+
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
291+
AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE);
292+
289293
/* reenable the UART */
290294
ar933x_uart_rmw(up, AR933X_UART_CS_REG,
291295
AR933X_UART_CS_IF_MODE_M << AR933X_UART_CS_IF_MODE_S,
@@ -418,6 +422,10 @@ static int ar933x_uart_startup(struct uart_port *port)
418422
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
419423
AR933X_UART_CS_HOST_INT_EN);
420424

425+
/* enable RX and TX ready overide */
426+
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
427+
AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE);
428+
421429
/* Enable RX interrupts */
422430
up->ier = AR933X_UART_INT_RX_VALID;
423431
ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier);

0 commit comments

Comments
 (0)