summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Scordino <claudio@evidence.eu.com>2011-01-14 00:45:39 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-14 02:32:31 +0100
commit5dfbd1d734ef5415bc47b034df7433ba21e40e7b (patch)
tree3fbe7a9997f20e6c7db040a2fc1da68b93c10302
parentirq: use per_cpu kstat_irqs (diff)
downloadlinux-5dfbd1d734ef5415bc47b034df7433ba21e40e7b.tar.xz
linux-5dfbd1d734ef5415bc47b034df7433ba21e40e7b.zip
atmel_serial: fix RTS high after initialization in RS485 mode
When working in RS485 mode, the atmel_serial driver keeps RTS high after the initialization of the serial port. It goes low only after the first character has been sent. [akpm@linux-foundation.org: simplify code] Signed-off-by: Claudio Scordino <claudio@evidence.eu.com> Signed-off-by: Arkadiusz Bubala <arkadiusz.bubala@gmail.com> Tested-by: Arkadiusz Bubala <arkadiusz.bubala@gmail.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/serial/atmel_serial.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 3892666b5fbd..2a1d52fb4936 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1732,6 +1732,11 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
device_init_wakeup(&pdev->dev, 1);
platform_set_drvdata(pdev, port);
+ if (port->rs485.flags & SER_RS485_ENABLED) {
+ UART_PUT_MR(&port->uart, ATMEL_US_USMODE_NORMAL);
+ UART_PUT_CR(&port->uart, ATMEL_US_RTSEN);
+ }
+
return 0;
err_add_port: