diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2017-11-06 11:49:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-08 13:09:35 +0100 |
commit | 21c4e7f255e38620bb4c5d1119c64114ab280e2e (patch) | |
tree | 355f5b6433c2e2c1f9494e2057745615e4218654 /drivers/tty | |
parent | 7ecc77011c6fb40d3eef7c6a0ebcec61e69b3ec3 (diff) | |
download | linux-21c4e7f255e38620bb4c5d1119c64114ab280e2e.tar.gz linux-21c4e7f255e38620bb4c5d1119c64114ab280e2e.tar.bz2 linux-21c4e7f255e38620bb4c5d1119c64114ab280e2e.zip |
serial: 8250_fintek: Disable delays for ports != 0
According to the datasheet, only the first port supports delay before
send and delay after send.
Reported-by: "Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_fintek.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c index 6c7910d8e136..ae7d86e44b76 100644 --- a/drivers/tty/serial/8250/8250_fintek.c +++ b/drivers/tty/serial/8250/8250_fintek.c @@ -212,6 +212,12 @@ static int fintek_8250_rs485_config(struct uart_port *port, rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND; + /* Only the first port supports delays */ + if (pdata->index) { + rs485->delay_rts_before_send = 0; + rs485->delay_rts_after_send = 0; + } + if (rs485->delay_rts_before_send) { rs485->delay_rts_before_send = 1; config |= TXW4C_IRA; |