Skip to content

Commit

Permalink
serial: bfin_5xx: IRDA is not affected by anomaly 05000230
Browse files Browse the repository at this point in the history
Anomaly 05000230 (over sampling of the UART STOP bit) applies only when
the peripheral is operating in UART mode.  So drop the anomaly handling
when the UART is in IRDA mode.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Graf Yang authored and Greg Kroah-Hartman committed Jun 4, 2010
1 parent 99ec88f commit ca3e442
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/serial/bfin_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
}

baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
quot = uart_get_divisor(port, baud);

/* If discipline is not IRDA, apply ANOMALY_05000230 */
if (termios->c_line != N_IRDA)
quot -= ANOMALY_05000230;

spin_lock_irqsave(&uart->port.lock, flags);

UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);
Expand Down

0 comments on commit ca3e442

Please sign in to comment.