]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
serial: fsl_lpuart: fix maximum acceptable baud rate with over-sampling
authorTomonori Sakita <tomonori.sakita@sord.co.jp>
Mon, 21 Jan 2019 08:34:16 +0000 (17:34 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 07:18:53 +0000 (08:18 +0100)
[ Upstream commit 815d835b7ba46685c316b000013367dacb2b461b ]

Using over-sampling ratio, lpuart can accept baud rate upto uartclk / 4.

Signed-off-by: Tomonori Sakita <tomonori.sakita@sord.co.jp>
Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/fsl_lpuart.c

index 839e65da4d3f7ea3f91e84508cc140ca58ecf2a7..f18551ea5ba51a16c74a4a02c64a1525ca09f7bf 100644 (file)
@@ -1426,7 +1426,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
        }
 
        /* ask the core to calculate the divisor */
-       baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16);
+       baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 4);
 
        spin_lock_irqsave(&sport->port.lock, flags);