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 <gch981213@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://lore.kernel.org/r/20200207095335.GA179836@makrotopia.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
bb6d3fb354
commit
87c5cbf71e
|
@ -286,6 +286,10 @@ static void ar933x_uart_set_termios(struct uart_port *port,
|
||||||
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
|
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
|
||||||
AR933X_UART_CS_HOST_INT_EN);
|
AR933X_UART_CS_HOST_INT_EN);
|
||||||
|
|
||||||
|
/* enable RX and TX ready overide */
|
||||||
|
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
|
||||||
|
AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE);
|
||||||
|
|
||||||
/* reenable the UART */
|
/* reenable the UART */
|
||||||
ar933x_uart_rmw(up, AR933X_UART_CS_REG,
|
ar933x_uart_rmw(up, AR933X_UART_CS_REG,
|
||||||
AR933X_UART_CS_IF_MODE_M << AR933X_UART_CS_IF_MODE_S,
|
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)
|
||||||
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
|
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
|
||||||
AR933X_UART_CS_HOST_INT_EN);
|
AR933X_UART_CS_HOST_INT_EN);
|
||||||
|
|
||||||
|
/* enable RX and TX ready overide */
|
||||||
|
ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
|
||||||
|
AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE);
|
||||||
|
|
||||||
/* Enable RX interrupts */
|
/* Enable RX interrupts */
|
||||||
up->ier = AR933X_UART_INT_RX_VALID;
|
up->ier = AR933X_UART_INT_RX_VALID;
|
||||||
ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier);
|
ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier);
|
||||||
|
|
Loading…
Reference in New Issue