]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
serial: bfin_5xx: IRDA is not affected by anomaly 05000230
authorGraf Yang <graf.yang@analog.com>
Sun, 23 May 2010 08:40:13 +0000 (04:40 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Jun 2010 20:37:17 +0000 (13:37 -0700)
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>
drivers/serial/bfin_5xx.c

index 96f7e7484feebf4269c631862f9a01b227eac0f6..a78652b21e402afe7a146bbdf2f389e44729fd35 100644 (file)
@@ -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);