aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/bfin_5xx.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index ca9ceaa113a..af84984df77 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -216,8 +216,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
216 struct pt_regs *regs = get_irq_regs(); 216 struct pt_regs *regs = get_irq_regs();
217#endif 217#endif
218 218
219 ch = UART_GET_CHAR(uart);
220 status = UART_GET_LSR(uart); 219 status = UART_GET_LSR(uart);
220 UART_CLEAR_LSR(uart);
221
222 ch = UART_GET_CHAR(uart);
221 uart->port.icount.rx++; 223 uart->port.icount.rx++;
222 224
223#ifdef CONFIG_KGDB_UART 225#ifdef CONFIG_KGDB_UART
@@ -335,7 +337,7 @@ static irqreturn_t bfin_serial_rx_int(int irq, void *dev_id)
335 struct bfin_serial_port *uart = dev_id; 337 struct bfin_serial_port *uart = dev_id;
336 338
337 spin_lock(&uart->port.lock); 339 spin_lock(&uart->port.lock);
338 while ((UART_GET_IER(uart) & ERBFI) && (UART_GET_LSR(uart) & DR)) 340 while (UART_GET_LSR(uart) & DR)
339 bfin_serial_rx_chars(uart); 341 bfin_serial_rx_chars(uart);
340 spin_unlock(&uart->port.lock); 342 spin_unlock(&uart->port.lock);
341 343
@@ -347,7 +349,7 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
347 struct bfin_serial_port *uart = dev_id; 349 struct bfin_serial_port *uart = dev_id;
348 350
349 spin_lock(&uart->port.lock); 351 spin_lock(&uart->port.lock);
350 if ((UART_GET_IER(uart) & ETBEI) && (UART_GET_LSR(uart) & THRE)) 352 if (UART_GET_LSR(uart) & THRE)
351 bfin_serial_tx_chars(uart); 353 bfin_serial_tx_chars(uart);
352 spin_unlock(&uart->port.lock); 354 spin_unlock(&uart->port.lock);
353 355
@@ -428,6 +430,8 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
428 int i, flg, status; 430 int i, flg, status;
429 431
430 status = UART_GET_LSR(uart); 432 status = UART_GET_LSR(uart);
433 UART_CLEAR_LSR(uart);
434
431 uart->port.icount.rx += CIRC_CNT(uart->rx_dma_buf.head, uart->rx_dma_buf.tail, UART_XMIT_SIZE);; 435 uart->port.icount.rx += CIRC_CNT(uart->rx_dma_buf.head, uart->rx_dma_buf.tail, UART_XMIT_SIZE);;
432 436
433 if (status & BI) { 437 if (status & BI) {