From: Claudio Scordino Date: Thu, 13 Jan 2011 23:45:39 +0000 (-0800) Subject: atmel_serial: fix RTS high after initialization in RS485 mode X-Git-Tag: v2.6.38-rc1~218 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=5dfbd1d734ef5415bc47b034df7433ba21e40e7b;p=~shefty%2Frdma-dev.git 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 Signed-off-by: Arkadiusz Bubala Tested-by: Arkadiusz Bubala Cc: Nicolas Ferre Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 3892666b5fb..2a1d52fb493 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: