From 850d7f76ced08e473e358944cbeeb061026df49a Mon Sep 17 00:00:00 2001 From: Zhang Jiejing Date: Mon, 13 Dec 2010 13:58:29 -0600 Subject: [PATCH] ENGR00133590 UART: let user control HW flow control HW flow control should be enable/disable by userspace. It can be set by tty option: options.c_cflag of CRTSCTS bit. This bug is found by testing UART BT AR3001 chip, this chip will wake up the chip by set RTS to high, it needs frist disable HW flow control, set RTS, then disable HW flow control. Signed-off-by: Zhang Jiejing --- drivers/serial/mxc_uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/serial/mxc_uart.c b/drivers/serial/mxc_uart.c index 8f2cd0c87df..5b01064db9a 100644 --- a/drivers/serial/mxc_uart.c +++ b/drivers/serial/mxc_uart.c @@ -1379,6 +1379,9 @@ static void mxcuart_set_termios(struct uart_port *port, umxc->port.ignore_status_mask |= UART_CREAD_BIT; } + /* Hardware flow control should controled by userspace */ + umxc->hardware_flow = (termios->c_cflag & CRTSCTS) ? 1 : 0; + cr4 = readl(umxc->port.membase + MXC_UARTUCR4); if (UART_ENABLE_MS(port, termios->c_cflag)) { mxcuart_enable_ms(port);