aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/xilinx_uartps.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-09-03 15:05:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-18 16:07:23 +0200
commit6ac1b91f346f7c489ef2a582b0c8c085fc51aabb (patch)
treefb352ee1958dff5aa4c2a09f5d29ceb0f7a0cf70 /drivers/tty/serial/xilinx_uartps.c
parentserial: uartps: Move Port ID to device data structure (diff)
downloadlinux-dev-6ac1b91f346f7c489ef2a582b0c8c085fc51aabb.tar.xz
linux-dev-6ac1b91f346f7c489ef2a582b0c8c085fc51aabb.zip
serial: uartps: Enable automatic flow control
Enable automatic flow control which should ensure that there is no mainteinance in connection for zcu100 BT case. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Nava kishore Manne <navam@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/tty/serial/xilinx_uartps.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 0443edc1ad78..71c032744dae 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1006,13 +1006,12 @@ static void cdns_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
val = readl(port->membase + CDNS_UART_MODEMCR);
mode_reg = readl(port->membase + CDNS_UART_MR);
- val &= ~(CDNS_UART_MODEMCR_RTS | CDNS_UART_MODEMCR_DTR);
+ val &= ~(CDNS_UART_MODEMCR_RTS | CDNS_UART_MODEMCR_DTR |
+ CDNS_UART_MODEMCR_FCM);
mode_reg &= ~CDNS_UART_MR_CHMODE_MASK;
- if (mctrl & TIOCM_RTS)
- val |= CDNS_UART_MODEMCR_RTS;
- if (mctrl & TIOCM_DTR)
- val |= CDNS_UART_MODEMCR_DTR;
+ if (mctrl & TIOCM_RTS || mctrl & TIOCM_DTR)
+ val |= CDNS_UART_MODEMCR_FCM;
if (mctrl & TIOCM_LOOP)
mode_reg |= CDNS_UART_MR_CHMODE_L_LOOP;
else