aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2011-12-12 23:22:02 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-13 12:50:15 -0500
commit64851636d568ae9f167cd5d1dcdbfe17e6eef73c (patch)
tree326080595e354d09fb4f93b7f904ae1a84719a2a
parentb48dc711c33034958768fadf15f75abff95fb499 (diff)
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>
-rw-r--r--drivers/tty/serial/bfin_uart.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c
index dedd9ab06d8..26953bfa692 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)
116static irqreturn_t bfin_serial_mctrl_cts_int(int irq, void *dev_id) 116static irqreturn_t bfin_serial_mctrl_cts_int(int irq, void *dev_id)
117{ 117{
118 struct bfin_serial_port *uart = dev_id; 118 struct bfin_serial_port *uart = dev_id;
119 unsigned int status; 119 unsigned int status = bfin_serial_get_mctrl(&uart->port);
120
121 status = bfin_serial_get_mctrl(&uart->port);
122#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 120#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
121 struct tty_struct *tty = uart->port.state->port.tty;
122
123 UART_CLEAR_SCTS(uart); 123 UART_CLEAR_SCTS(uart);
124 if (tty->hw_stopped) {
125 if (status) {
126 tty->hw_stopped = 0;
127 uart_write_wakeup(&uart->port);
128 }
129 } else {
130 if (!status)
131 tty->hw_stopped = 1;
132 }
124#endif 133#endif
125 uart_handle_cts_change(&uart->port, status & TIOCM_CTS); 134 uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
126 135
@@ -1358,7 +1367,9 @@ static int bfin_serial_probe(struct platform_device *pdev)
1358 uart->cts_pin = -1; 1367 uart->cts_pin = -1;
1359 else { 1368 else {
1360 uart->cts_pin = res->start; 1369 uart->cts_pin = res->start;
1370#ifdef CONFIG_SERIAL_BFIN_CTSRTS
1361 uart->port.flags |= ASYNC_CTS_FLOW; 1371 uart->port.flags |= ASYNC_CTS_FLOW;
1372#endif
1362 } 1373 }
1363 1374
1364 res = platform_get_resource(pdev, IORESOURCE_IO, 1); 1375 res = platform_get_resource(pdev, IORESOURCE_IO, 1);