Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1028,6 +1028,11 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
		 */
		div = 1;
	} 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);
		if (div > 7)
			div = 7;