Commit 09bd00f6 authored by Hubert Feurstein's avatar Hubert Feurstein Committed by Greg Kroah-Hartman

serial/imx: fix custom-baudrate handling

It was not possible to set custom-baudrates like 62500.
Signed-off-by: default avatarHubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a496e628
...@@ -1028,6 +1028,11 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -1028,6 +1028,11 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
*/ */
div = 1; div = 1;
} else { } else {
/* custom-baudrate handling */
div = sport->port.uartclk / (baud * 16);
if (baud == 38400 && quot != div)
baud = sport->port.uartclk / (quot * 16);
div = sport->port.uartclk / (baud * 16); div = sport->port.uartclk / (baud * 16);
if (div > 7) if (div > 7)
div = 7; div = 7;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment