浏览代码

[ARM] 5244/1: Add hardware CTSRTS flow control to pxa serial driver

Adds hardware CTSRTS control for pxa serial devices through
termios controls.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Robert Jarzmik 16 年之前
父节点
当前提交
2276f03b74
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      drivers/serial/pxa.c

+ 5 - 0
drivers/serial/pxa.c

@@ -534,6 +534,11 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
 
 	serial_out(up, UART_IER, up->ier);
 
+	if (termios->c_cflag & CRTSCTS)
+		up->mcr |= UART_MCR_AFE;
+	else
+		up->mcr &= ~UART_MCR_AFE;
+
 	serial_out(up, UART_LCR, cval | UART_LCR_DLAB);/* set DLAB */
 	serial_out(up, UART_DLL, quot & 0xff);		/* LS of divisor */
 	serial_out(up, UART_DLM, quot >> 8);		/* MS of divisor */