Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86555
b: refs/heads/master
c: 1b73351
h: refs/heads/master
i:
  86553: 2d0bb1b
  86551: 4d1e8af
v: v3
  • Loading branch information
Sonic Zhang authored and Bryan Wu committed Dec 21, 2007
1 parent d29f4b1 commit 66b3e8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 759eb040901af60d8a1a2b59b93805521b156cbb
refs/heads/master: 1b73351c6afcc3acbf9e29a43ee14b3c9a386503
25 changes: 10 additions & 15 deletions trunk/drivers/serial/bfin_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart);
static void bfin_serial_stop_tx(struct uart_port *port)
{
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
#ifndef CONFIG_BF54x
#if !defined(CONFIG_BF54x) && !defined(CONFIG_SERIAL_BFIN_DMA)
unsigned short ier;
#endif

Expand Down Expand Up @@ -307,7 +307,6 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart)
UART_PUT_CHAR(uart, uart->port.x_char);
uart->port.icount.tx++;
uart->port.x_char = 0;
return;
}
/*
* Check the modem control lines before
Expand Down Expand Up @@ -376,28 +375,26 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)

if (!uart->tx_done)
return;

uart->tx_done = 0;

if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) {
bfin_serial_stop_tx(&uart->port);
uart->tx_done = 1;
return;
}

if (uart->port.x_char) {
UART_PUT_CHAR(uart, uart->port.x_char);
uart->port.icount.tx++;
uart->port.x_char = 0;
uart->tx_done = 1;
return;
}

/*
* Check the modem control lines before
* transmitting anything.
*/
bfin_serial_mctrl_check(uart);

if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) {
bfin_serial_stop_tx(&uart->port);
uart->tx_done = 1;
return;
}

spin_lock_irqsave(&uart->port.lock, flags);
uart->tx_count = CIRC_CNT(xmit->head, xmit->tail, UART_XMIT_SIZE);
if (uart->tx_count > (UART_XMIT_SIZE - xmit->tail))
Expand Down Expand Up @@ -471,8 +468,6 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
int x_pos, pos;
int flags = 0;

bfin_serial_dma_tx_chars(uart);

spin_lock_irqsave(&uart->port.lock, flags);
x_pos = DMA_RX_XCOUNT - get_dma_curr_xcount(uart->rx_dma_channel);
if (x_pos == DMA_RX_XCOUNT)
Expand Down Expand Up @@ -513,9 +508,9 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(&uart->port);

if (uart_circ_empty(xmit))
bfin_serial_stop_tx(&uart->port);
uart->tx_done = 1;

bfin_serial_dma_tx_chars(uart);
}

spin_unlock(&uart->port.lock);
Expand Down

0 comments on commit 66b3e8e

Please sign in to comment.