diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-01-22 12:01:43 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-01-22 12:01:43 +0800 |
commit | b4bbeeb816c06fd59dea2ea82c7b5650eb185e65 (patch) | |
tree | a9b57e3df7589fe3a8649c41eff9b49685b99aec /drivers/tty/serial | |
parent | ee620ddd6581cf9779d27677f6f0f11e3f939a8c (diff) | |
parent | 261e8dbdb94baf294d0c8d45de843bb3d928c90e (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/atmel_serial.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index e0b89b961e1b..a0f911641b04 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -470,6 +470,14 @@ static void atmel_stop_tx(struct uart_port *port) /* disable PDC transmit */ atmel_uart_writel(port, ATMEL_PDC_PTCR, ATMEL_PDC_TXTDIS); } + + /* + * Disable the transmitter. + * This is mandatory when DMA is used, otherwise the DMA buffer + * is fully transmitted. + */ + atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXDIS); + /* Disable interrupts */ atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask); @@ -502,6 +510,9 @@ static void atmel_start_tx(struct uart_port *port) /* Enable interrupts */ atmel_uart_writel(port, ATMEL_US_IER, atmel_port->tx_done_mask); + + /* re-enable the transmitter */ + atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN); } /* |