summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-18 08:04:26 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-18 15:01:02 +0100
commit6dbd54e4154dfe386b3333687de15be239576617 (patch)
tree10c4940cbccf47b0b9c6a1d7411db918079b3a40
parent9b614afe6c8048cbab04aa269d6e2ce26335f85a (diff)
downloadlinux-6dbd54e4154dfe386b3333687de15be239576617.tar.gz
linux-6dbd54e4154dfe386b3333687de15be239576617.tar.bz2
linux-6dbd54e4154dfe386b3333687de15be239576617.zip
Revert "tty/serial: atmel: fix out of range clock divider handling"
This reverts commit 751d0017334db9c4d68a8909c59f662a6ecbcec6. The wrong commit got added to the tty-next tree, the correct one is in the tty-linus branch. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: David Engraf <david.engraf@sysgo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/atmel_serial.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 9983e2fabbac..a8dc8af83f39 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2270,6 +2270,9 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
mode |= ATMEL_US_USMODE_NORMAL;
}
+ /* set the mode, clock divisor, parity, stop bits and data size */
+ atmel_uart_writel(port, ATMEL_US_MR, mode);
+
/*
* when switching the mode, set the RTS line state according to the
* new mode, otherwise keep the former state
@@ -2312,9 +2315,6 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
}
quot = cd | fp << ATMEL_US_FP_OFFSET;
- /* set the mode, clock divisor, parity, stop bits and data size */
- atmel_uart_writel(port, ATMEL_US_MR, mode);
-
if (!(port->iso7816.flags & SER_ISO7816_ENABLED))
atmel_uart_writel(port, ATMEL_US_BRGR, quot);
atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);