aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/bfin_uart.c
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2011-12-05 05:13:11 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-09 22:05:32 -0500
commitf5b6940cbc6fb955a0c2be7ed324efc00e61f481 (patch)
tree10eaf64e785ff55e654c3eee67d995389d9916e1 /drivers/tty/serial/bfin_uart.c
parentee948e379ede642b7499e78e8e30c10f90c0a1c5 (diff)
serial: bfin-uart: remove redundant CTS check for hardware CTS control.
Blackfin hardware CTS control generate interrupt for both CTS on and off. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial/bfin_uart.c')
-rw-r--r--drivers/tty/serial/bfin_uart.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c
index f24f8a2073d9..abac23741057 100644
--- a/drivers/tty/serial/bfin_uart.c
+++ b/drivers/tty/serial/bfin_uart.c
@@ -119,12 +119,10 @@ static irqreturn_t bfin_serial_mctrl_cts_int(int irq, void *dev_id)
119 unsigned int status; 119 unsigned int status;
120 120
121 status = bfin_serial_get_mctrl(&uart->port); 121 status = bfin_serial_get_mctrl(&uart->port);
122 uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
123#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 122#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
124 uart->scts = 1;
125 UART_CLEAR_SCTS(uart); 123 UART_CLEAR_SCTS(uart);
126 UART_CLEAR_IER(uart, EDSSI);
127#endif 124#endif
125 uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
128 126
129 return IRQ_HANDLED; 127 return IRQ_HANDLED;
130} 128}
@@ -175,13 +173,6 @@ static void bfin_serial_start_tx(struct uart_port *port)
175 struct bfin_serial_port *uart = (struct bfin_serial_port *)port; 173 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
176 struct tty_struct *tty = uart->port.state->port.tty; 174 struct tty_struct *tty = uart->port.state->port.tty;
177 175
178#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
179 if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
180 uart->scts = 0;
181 uart_handle_cts_change(&uart->port, uart->scts);
182 }
183#endif
184
185 /* 176 /*
186 * To avoid losting RX interrupt, we reset IR function 177 * To avoid losting RX interrupt, we reset IR function
187 * before sending data. 178 * before sending data.
@@ -380,12 +371,6 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
380{ 371{
381 struct bfin_serial_port *uart = dev_id; 372 struct bfin_serial_port *uart = dev_id;
382 373
383#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
384 if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
385 uart->scts = 0;
386 uart_handle_cts_change(&uart->port, uart->scts);
387 }
388#endif
389 spin_lock(&uart->port.lock); 374 spin_lock(&uart->port.lock);
390 if (UART_GET_LSR(uart) & THRE) 375 if (UART_GET_LSR(uart) & THRE)
391 bfin_serial_tx_chars(uart); 376 bfin_serial_tx_chars(uart);
@@ -531,13 +516,6 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
531 struct bfin_serial_port *uart = dev_id; 516 struct bfin_serial_port *uart = dev_id;
532 struct circ_buf *xmit = &uart->port.state->xmit; 517 struct circ_buf *xmit = &uart->port.state->xmit;
533 518
534#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
535 if (uart->scts && !(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
536 uart->scts = 0;
537 uart_handle_cts_change(&uart->port, uart->scts);
538 }
539#endif
540
541 spin_lock(&uart->port.lock); 519 spin_lock(&uart->port.lock);
542 if (!(get_dma_curr_irqstat(uart->tx_dma_channel)&DMA_RUN)) { 520 if (!(get_dma_curr_irqstat(uart->tx_dma_channel)&DMA_RUN)) {
543 disable_dma(uart->tx_dma_channel); 521 disable_dma(uart->tx_dma_channel);