aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/atmel_serial.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 61db2166fbb5..955c46da5800 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -793,8 +793,14 @@ static void __init atmel_console_get_options(struct uart_port *port, int *baud,
793 else if (mr == ATMEL_US_PAR_ODD) 793 else if (mr == ATMEL_US_PAR_ODD)
794 *parity = 'o'; 794 *parity = 'o';
795 795
796 /*
797 * The serial core only rounds down when matching this to a
798 * supported baud rate. Make sure we don't end up slightly
799 * lower than one of those, as it would make us fall through
800 * to a much lower baud rate than we really want.
801 */
796 quot = UART_GET_BRGR(port); 802 quot = UART_GET_BRGR(port);
797 *baud = port->uartclk / (16 * (quot)); 803 *baud = port->uartclk / (16 * (quot - 1));
798} 804}
799 805
800static int __init atmel_console_setup(struct console *co, char *options) 806static int __init atmel_console_setup(struct console *co, char *options)