Skip to content

Commit 09bd00f

Browse files
hfeursteingregkh
authored andcommitted
serial/imx: fix custom-baudrate handling
It was not possible to set custom-baudrates like 62500. Signed-off-by: Hubert Feurstein <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a496e62 commit 09bd00f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/tty/serial/imx.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,11 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
10281028
*/
10291029
div = 1;
10301030
} else {
1031+
/* custom-baudrate handling */
1032+
div = sport->port.uartclk / (baud * 16);
1033+
if (baud == 38400 && quot != div)
1034+
baud = sport->port.uartclk / (quot * 16);
1035+
10311036
div = sport->port.uartclk / (baud * 16);
10321037
if (div > 7)
10331038
div = 7;

0 commit comments

Comments
 (0)