summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/8250/8250_mid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/8250/8250_mid.c')
-rw-r--r--drivers/tty/serial/8250/8250_mid.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c
index 86379a79a..0f50a3f5e 100644
--- a/drivers/tty/serial/8250/8250_mid.c
+++ b/drivers/tty/serial/8250/8250_mid.c
@@ -154,6 +154,9 @@ static void mid8250_set_termios(struct uart_port *p,
unsigned long w = BIT(24) - 1;
unsigned long mul, div;
+ /* Gracefully handle the B0 case: fall back to B9600 */
+ fuart = fuart ? fuart : 9600 * 16;
+
if (mid->board->freq < fuart) {
/* Find prescaler value that satisfies Fuart < Fref */
if (mid->board->freq > baud)