aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty')
-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 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)
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);