|
@@ -1088,7 +1088,7 @@ static void mxs_auart_settermios(struct uart_port *u,
|
|
|
AUART_LINECTRL_BAUD_DIV_MAX);
|
|
|
baud_max = u->uartclk * 32 / AUART_LINECTRL_BAUD_DIV_MIN;
|
|
|
baud = uart_get_baud_rate(u, termios, old, baud_min, baud_max);
|
|
|
- div = u->uartclk * 32 / baud;
|
|
|
+ div = DIV_ROUND_CLOSEST(u->uartclk * 32, baud);
|
|
|
}
|
|
|
|
|
|
ctrl |= AUART_LINECTRL_BAUD_DIVFRAC(div & 0x3F);
|