Skip to contentSkip to conversation

serial/imx: fix custom-baudrate handling

PATCH New Hubert Feurstein 1 participant 1 message Jul 18, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial/imx: fix custom-baudrate handling

It was not possible to set custom-baudrates like 62500.

---
 drivers/tty/serial/imx.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/tty/serial/imx.c +5 -0
index 415cec6..a6671ed 100644
@@ -1020,6 +1020,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;
Signature · 1 line
1.7.9.5