|
@@ -1975,7 +1975,10 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
|
|
* that the previous boot loader has enabled required clocks and
|
|
* that the previous boot loader has enabled required clocks and
|
|
* setup the baud rate generator hardware for us already.
|
|
* setup the baud rate generator hardware for us already.
|
|
*/
|
|
*/
|
|
- max_baud = port->uartclk ? port->uartclk / 16 : 115200;
|
|
|
|
|
|
+ if (port->uartclk)
|
|
|
|
+ max_baud = port->uartclk / max(s->sampling_rate, 8U);
|
|
|
|
+ else
|
|
|
|
+ max_baud = 115200;
|
|
|
|
|
|
baud = uart_get_baud_rate(port, termios, old, 0, max_baud);
|
|
baud = uart_get_baud_rate(port, termios, old, 0, max_baud);
|
|
if (likely(baud && port->uartclk))
|
|
if (likely(baud && port->uartclk))
|