diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2011-12-13 12:22:02 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-13 09:50:15 -0800 |
commit | 64851636d568ae9f167cd5d1dcdbfe17e6eef73c (patch) | |
tree | 326080595e354d09fb4f93b7f904ae1a84719a2a /drivers/tty | |
parent | b48dc711c33034958768fadf15f75abff95fb499 (diff) | |
download | linux-stable-64851636d568ae9f167cd5d1dcdbfe17e6eef73c.tar.gz linux-stable-64851636d568ae9f167cd5d1dcdbfe17e6eef73c.tar.bz2 linux-stable-64851636d568ae9f167cd5d1dcdbfe17e6eef73c.zip |
serial: bfin-uart: Remove ASYNC_CTS_FLOW flag for hardware automatic CTS.
Blackfin uart supports automatic CTS trigger when hardware flow control is enabled.
No need to start and top tx in CTS interrupt. So, remote ASYNC_CTS_FLOW flag.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/bfin_uart.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c index dedd9ab06d82..26953bfa6922 100644 --- a/drivers/tty/serial/bfin_uart.c +++ b/drivers/tty/serial/bfin_uart.c @@ -116,11 +116,20 @@ static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) static irqreturn_t bfin_serial_mctrl_cts_int(int irq, void *dev_id) { struct bfin_serial_port *uart = dev_id; - unsigned int status; - - status = bfin_serial_get_mctrl(&uart->port); + unsigned int status = bfin_serial_get_mctrl(&uart->port); #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS + struct tty_struct *tty = uart->port.state->port.tty; + UART_CLEAR_SCTS(uart); + if (tty->hw_stopped) { + if (status) { + tty->hw_stopped = 0; + uart_write_wakeup(&uart->port); + } + } else { + if (!status) + tty->hw_stopped = 1; + } #endif uart_handle_cts_change(&uart->port, status & TIOCM_CTS); @@ -1358,7 +1367,9 @@ static int bfin_serial_probe(struct platform_device *pdev) uart->cts_pin = -1; else { uart->cts_pin = res->start; +#ifdef CONFIG_SERIAL_BFIN_CTSRTS uart->port.flags |= ASYNC_CTS_FLOW; +#endif } res = platform_get_resource(pdev, IORESOURCE_IO, 1); |