| .. | .. |
|---|
| 1048 | 1048 | */ |
|---|
| 1049 | 1049 | static inline void pl011_dma_rx_stop(struct uart_amba_port *uap) |
|---|
| 1050 | 1050 | { |
|---|
| 1051 | + if (!uap->using_rx_dma) |
|---|
| 1052 | + return; |
|---|
| 1053 | + |
|---|
| 1051 | 1054 | /* FIXME. Just disable the DMA enable */ |
|---|
| 1052 | 1055 | uap->dmacr &= ~UART011_RXDMAE; |
|---|
| 1053 | 1056 | pl011_write(uap->dmacr, uap, REG_DMACR); |
|---|
| .. | .. |
|---|
| 1757 | 1760 | static void pl011_unthrottle_rx(struct uart_port *port) |
|---|
| 1758 | 1761 | { |
|---|
| 1759 | 1762 | struct uart_amba_port *uap = container_of(port, struct uart_amba_port, port); |
|---|
| 1763 | + unsigned long flags; |
|---|
| 1760 | 1764 | |
|---|
| 1761 | | - pl011_enable_interrupts(uap); |
|---|
| 1765 | + spin_lock_irqsave(&uap->port.lock, flags); |
|---|
| 1766 | + |
|---|
| 1767 | + uap->im = UART011_RTIM; |
|---|
| 1768 | + if (!pl011_dma_rx_running(uap)) |
|---|
| 1769 | + uap->im |= UART011_RXIM; |
|---|
| 1770 | + |
|---|
| 1771 | + pl011_write(uap->im, uap, REG_IMSC); |
|---|
| 1772 | + |
|---|
| 1773 | + spin_unlock_irqrestore(&uap->port.lock, flags); |
|---|
| 1762 | 1774 | } |
|---|
| 1763 | 1775 | |
|---|
| 1764 | 1776 | static int pl011_startup(struct uart_port *port) |
|---|