Commit 64851636 authored by Sonic Zhang's avatar Sonic Zhang Committed by Greg Kroah-Hartman

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: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b48dc711
...@@ -116,11 +116,20 @@ static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) ...@@ -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) static irqreturn_t bfin_serial_mctrl_cts_int(int irq, void *dev_id)
{ {
struct bfin_serial_port *uart = dev_id; struct bfin_serial_port *uart = dev_id;
unsigned int status; unsigned int status = bfin_serial_get_mctrl(&uart->port);
status = bfin_serial_get_mctrl(&uart->port);
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
struct tty_struct *tty = uart->port.state->port.tty;
UART_CLEAR_SCTS(uart); 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 #endif
uart_handle_cts_change(&uart->port, status & TIOCM_CTS); uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
...@@ -1358,7 +1367,9 @@ static int bfin_serial_probe(struct platform_device *pdev) ...@@ -1358,7 +1367,9 @@ static int bfin_serial_probe(struct platform_device *pdev)
uart->cts_pin = -1; uart->cts_pin = -1;
else { else {
uart->cts_pin = res->start; uart->cts_pin = res->start;
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
uart->port.flags |= ASYNC_CTS_FLOW; uart->port.flags |= ASYNC_CTS_FLOW;
#endif
} }
res = platform_get_resource(pdev, IORESOURCE_IO, 1); res = platform_get_resource(pdev, IORESOURCE_IO, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment