aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/bfin_5xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/bfin_5xx.c')
-rw-r--r--drivers/serial/bfin_5xx.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 787dc7168f3e..22569bd5d821 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -185,6 +185,7 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
185 uart->port.icount.brk++; 185 uart->port.icount.brk++;
186 if (uart_handle_break(&uart->port)) 186 if (uart_handle_break(&uart->port))
187 goto ignore_char; 187 goto ignore_char;
188 status &= ~(PE | FE);
188 } 189 }
189 if (status & PE) 190 if (status & PE)
190 uart->port.icount.parity++; 191 uart->port.icount.parity++;
@@ -341,6 +342,7 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
341 uart->port.icount.brk++; 342 uart->port.icount.brk++;
342 if (uart_handle_break(&uart->port)) 343 if (uart_handle_break(&uart->port))
343 goto dma_ignore_char; 344 goto dma_ignore_char;
345 status &= ~(PE | FE);
344 } 346 }
345 if (status & PE) 347 if (status & PE)
346 uart->port.icount.parity++; 348 uart->port.icount.parity++;
@@ -517,6 +519,14 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart)
517 */ 519 */
518static void bfin_serial_break_ctl(struct uart_port *port, int break_state) 520static void bfin_serial_break_ctl(struct uart_port *port, int break_state)
519{ 521{
522 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
523 u16 lcr = UART_GET_LCR(uart);
524 if (break_state)
525 lcr |= SB;
526 else
527 lcr &= ~SB;
528 UART_PUT_LCR(uart, lcr);
529 SSYNC();
520} 530}
521 531
522static int bfin_serial_startup(struct uart_port *port) 532static int bfin_serial_startup(struct uart_port *port)
@@ -625,11 +635,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
625 635
626 if (termios->c_cflag & CSTOPB) 636 if (termios->c_cflag & CSTOPB)
627 lcr |= STB; 637 lcr |= STB;
628 if (termios->c_cflag & PARENB) { 638 if (termios->c_cflag & PARENB)
629 lcr |= PEN; 639 lcr |= PEN;
630 if (!(termios->c_cflag & PARODD)) 640 if (!(termios->c_cflag & PARODD))
631 lcr |= EPS; 641 lcr |= EPS;
632 } 642 if (termios->c_cflag & CMSPAR)
643 lcr |= STP;
633 644
634 port->read_status_mask = OE; 645 port->read_status_mask = OE;
635 if (termios->c_iflag & INPCK) 646 if (termios->c_iflag & INPCK)