public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.4 01/11] serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE
@ 2020-03-03  2:50 Sasha Levin
  2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 02/11] usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags Sasha Levin
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Sasha Levin @ 2020-03-03  2:50 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Daniel Golle, Chuanhong Guo, Greg Kroah-Hartman, Sasha Levin,
	linux-serial

From: Daniel Golle <daniel@makrotopia.org>

[ Upstream commit 87c5cbf71ecbb9e289d60a2df22eb686c70bf196 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/tty/serial/ar933x_uart.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
index 1519d2ca7705f..40194791cde0b 100644
--- a/drivers/tty/serial/ar933x_uart.c
+++ b/drivers/tty/serial/ar933x_uart.c
@@ -294,6 +294,10 @@ static void ar933x_uart_set_termios(struct uart_port *port,
 	ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
 			    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 */
 	ar933x_uart_rmw(up, AR933X_UART_CS_REG,
 			AR933X_UART_CS_IF_MODE_M << AR933X_UART_CS_IF_MODE_S,
@@ -426,6 +430,10 @@ static int ar933x_uart_startup(struct uart_port *port)
 	ar933x_uart_rmw_set(up, AR933X_UART_CS_REG,
 			    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 */
 	up->ier = AR933X_UART_INT_RX_VALID;
 	ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-03-03  2:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-03  2:50 [PATCH AUTOSEL 4.4 01/11] serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 02/11] usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 03/11] usb: gadget: serial: fix Tx stall after buffer overflow Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 04/11] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 05/11] drm/msm/dsi: save pll state before dsi host is powered off Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 06/11] net: phy: restore mdio regs in the iproc mdio driver Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 07/11] net: ks8851-ml: Remove 8-bit bus accessors Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 08/11] net: ks8851-ml: Fix 16-bit data access Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 09/11] net: ks8851-ml: Fix 16-bit IO operation Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 10/11] watchdog: da9062: do not ping the hw during stop() Sasha Levin
2020-03-03  2:50 ` [PATCH AUTOSEL 4.4 11/11] s390/cio: cio_ignore_proc_seq_next should increase position index Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox