aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorBernhard Roth <br@pwrnet.de>2011-08-24 03:48:23 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-24 18:27:59 -0400
commit83cac9f3b45ba8e99c5305be42c67f1c83adf0aa (patch)
treeb9b5ec2373ec4e113535cdbe50a09e601fa32ee9 /drivers/tty
parent019dc9ea8d528eb3640bbba604e1e5a2f6994b1f (diff)
atmel_serial: RS485: receiving enabled when sending data
By default the atmel_serial driver in RS485 mode disables receiving data until all data in the send buffer has been sent. This flag allows to receive data even whilst sending data. Signed-off-by: Bernhard Roth <br@pwrnet.de> Signed-off-by: Claudio Scordino <claudio@evidence.eu.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/atmel_serial.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index af9b7814965a..c7232a916c1b 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -339,7 +339,8 @@ static void atmel_stop_tx(struct uart_port *port)
339 /* Disable interrupts */ 339 /* Disable interrupts */
340 UART_PUT_IDR(port, atmel_port->tx_done_mask); 340 UART_PUT_IDR(port, atmel_port->tx_done_mask);
341 341
342 if (atmel_port->rs485.flags & SER_RS485_ENABLED) 342 if ((atmel_port->rs485.flags & SER_RS485_ENABLED) &&
343 !(atmel_port->rs485.flags & SER_RS485_RX_DURING_TX))
343 atmel_start_rx(port); 344 atmel_start_rx(port);
344} 345}
345 346
@@ -356,7 +357,8 @@ static void atmel_start_tx(struct uart_port *port)
356 really need this.*/ 357 really need this.*/
357 return; 358 return;
358 359
359 if (atmel_port->rs485.flags & SER_RS485_ENABLED) 360 if ((atmel_port->rs485.flags & SER_RS485_ENABLED) &&
361 !(atmel_port->rs485.flags & SER_RS485_RX_DURING_TX))
360 atmel_stop_rx(port); 362 atmel_stop_rx(port);
361 363
362 /* re-enable PDC transmit */ 364 /* re-enable PDC transmit */
@@ -680,7 +682,8 @@ static void atmel_tx_dma(struct uart_port *port)
680 /* Enable interrupts */ 682 /* Enable interrupts */
681 UART_PUT_IER(port, atmel_port->tx_done_mask); 683 UART_PUT_IER(port, atmel_port->tx_done_mask);
682 } else { 684 } else {
683 if (atmel_port->rs485.flags & SER_RS485_ENABLED) { 685 if ((atmel_port->rs485.flags & SER_RS485_ENABLED) &&
686 !(atmel_port->rs485.flags & SER_RS485_RX_DURING_TX)) {
684 /* DMA done, stop TX, start RX for RS485 */ 687 /* DMA done, stop TX, start RX for RS485 */
685 atmel_start_rx(port); 688 atmel_start_rx(port);
686 } 689 }