aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/8250/8250_omap.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 6e4ff7148ead..fe6d2e51da09 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -120,10 +120,11 @@ static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
120 */ 120 */
121 lcr = serial_in(up, UART_LCR); 121 lcr = serial_in(up, UART_LCR);
122 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); 122 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
123 if (mctrl & TIOCM_RTS) 123 if ((mctrl & TIOCM_RTS) && (port->status & UPSTAT_AUTORTS))
124 serial_out(up, UART_EFR, priv->efr); 124 priv->efr |= UART_EFR_RTS;
125 else 125 else
126 serial_out(up, UART_EFR, priv->efr & ~UART_EFR_RTS); 126 priv->efr &= ~UART_EFR_RTS;
127 serial_out(up, UART_EFR, priv->efr);
127 serial_out(up, UART_LCR, lcr); 128 serial_out(up, UART_LCR, lcr);
128} 129}
129 130
@@ -272,10 +273,7 @@ static void omap8250_restore_regs(struct uart_8250_port *up)
272 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); 273 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
273 serial_dl_write(up, priv->quot); 274 serial_dl_write(up, priv->quot);
274 275
275 if (up->port.mctrl & TIOCM_RTS) 276 serial_out(up, UART_EFR, priv->efr);
276 serial_out(up, UART_EFR, priv->efr);
277 else
278 serial_out(up, UART_EFR, priv->efr & ~UART_EFR_RTS);
279 277
280 /* Configure flow control */ 278 /* Configure flow control */
281 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); 279 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
@@ -424,9 +422,9 @@ static void omap_8250_set_termios(struct uart_port *port,
424 up->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS | UPSTAT_AUTOXOFF); 422 up->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS | UPSTAT_AUTOXOFF);
425 423
426 if (termios->c_cflag & CRTSCTS && up->port.flags & UPF_HARD_FLOW) { 424 if (termios->c_cflag & CRTSCTS && up->port.flags & UPF_HARD_FLOW) {
427 /* Enable AUTORTS and AUTOCTS */ 425 /* Enable AUTOCTS (autoRTS is enabled when RTS is raised) */
428 up->port.status |= UPSTAT_AUTOCTS | UPSTAT_AUTORTS; 426 up->port.status |= UPSTAT_AUTOCTS | UPSTAT_AUTORTS;
429 priv->efr |= UART_EFR_CTS | UART_EFR_RTS; 427 priv->efr |= UART_EFR_CTS;
430 } else if (up->port.flags & UPF_SOFT_FLOW) { 428 } else if (up->port.flags & UPF_SOFT_FLOW) {
431 /* 429 /*
432 * IXON Flag: 430 * IXON Flag: