aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/atmel_serial.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 8d2cec0f03c2..dcebb28ffbc4 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1769,7 +1769,9 @@ static void atmel_get_ip_name(struct uart_port *port)
1769 1769
1770 /* 1770 /*
1771 * Only USART devices from at91sam9260 SOC implement fractional 1771 * Only USART devices from at91sam9260 SOC implement fractional
1772 * baudrate. 1772 * baudrate. It is available for all asynchronous modes, with the
1773 * following restriction: the sampling clock's duty cycle is not
1774 * constant.
1773 */ 1775 */
1774 atmel_port->has_frac_baudrate = false; 1776 atmel_port->has_frac_baudrate = false;
1775 atmel_port->has_hw_timer = false; 1777 atmel_port->has_hw_timer = false;
@@ -2213,8 +2215,7 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
2213 * then 2215 * then
2214 * 8 CD + FP = selected clock / (2 * baudrate) 2216 * 8 CD + FP = selected clock / (2 * baudrate)
2215 */ 2217 */
2216 if (atmel_port->has_frac_baudrate && 2218 if (atmel_port->has_frac_baudrate) {
2217 (mode & ATMEL_US_USMODE) == ATMEL_US_USMODE_NORMAL) {
2218 div = DIV_ROUND_CLOSEST(port->uartclk, baud * 2); 2219 div = DIV_ROUND_CLOSEST(port->uartclk, baud * 2);
2219 cd = div >> 3; 2220 cd = div >> 3;
2220 fp = div & ATMEL_US_FP_MASK; 2221 fp = div & ATMEL_US_FP_MASK;