Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88091
b: refs/heads/master
c: ba0657f
h: refs/heads/master
i:
  88089: f0facd5
  88087: 0370c60
v: v3
  • Loading branch information
Michael Trimarchi authored and Linus Torvalds committed Apr 2, 2008
1 parent 89f2e6c commit a6bd43f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: dd135ebbd2a6b5e07dadb66c4dd033bb69531051
refs/heads/master: ba0657ff0527bab83387e19eb98b423fcc290674
19 changes: 10 additions & 9 deletions trunk/drivers/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@

/* PDC registers */
#define UART_PUT_PTCR(port,v) __raw_writel(v, (port)->membase + ATMEL_PDC_PTCR)
#define UART_GET_TCR(port) __raw_readl((port)->membase + ATMEL_PDC_TCR)
#define UART_GET_PTSR(port) __raw_readl((port)->membase + ATMEL_PDC_PTSR)

#define UART_PUT_RPR(port,v) __raw_writel(v, (port)->membase + ATMEL_PDC_RPR)
Expand Down Expand Up @@ -562,17 +563,22 @@ static void atmel_tx_dma(struct uart_port *port)
struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
int count;

/* nothing left to transmit? */
if (UART_GET_TCR(port))
return;

xmit->tail += pdc->ofs;
xmit->tail &= UART_XMIT_SIZE - 1;

port->icount.tx += pdc->ofs;
pdc->ofs = 0;

if (!uart_circ_empty(xmit)) {
/* more to transmit - setup next transfer */
/* more to transmit - setup next transfer */

/* disable PDC transmit */
UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS);
/* disable PDC transmit */
UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS);

if (!uart_circ_empty(xmit)) {
dma_sync_single_for_device(port->dev,
pdc->dma_addr,
pdc->dma_size,
Expand All @@ -586,11 +592,6 @@ static void atmel_tx_dma(struct uart_port *port)
/* re-enable PDC transmit and interrupts */
UART_PUT_PTCR(port, ATMEL_PDC_TXTEN);
UART_PUT_IER(port, ATMEL_US_ENDTX | ATMEL_US_TXBUFE);
} else {
/* nothing left to transmit - disable the transmitter */

/* disable PDC transmit */
UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS);
}

if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
Expand Down

0 comments on commit a6bd43f

Please sign in to comment.