]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 5244/1: Add hardware CTSRTS flow control to pxa serial driver
authorRobert Jarzmik <robert.jarzmik@free.fr>
Sat, 6 Sep 2008 22:01:32 +0000 (23:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 9 Sep 2008 15:32:53 +0000 (16:32 +0100)
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>
drivers/serial/pxa.c

index f7a0d37c42219678bf1d7c8d64bb79deced586ab..abc00be55433f428bba85a73bdb0e010d653d123 100644 (file)
@@ -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 */