|
@@ -755,18 +755,18 @@ out:
|
|
static irqreturn_t lpuart_int(int irq, void *dev_id)
|
|
static irqreturn_t lpuart_int(int irq, void *dev_id)
|
|
{
|
|
{
|
|
struct lpuart_port *sport = dev_id;
|
|
struct lpuart_port *sport = dev_id;
|
|
- unsigned char sts;
|
|
|
|
|
|
+ unsigned char sts, crdma;
|
|
|
|
|
|
sts = readb(sport->port.membase + UARTSR1);
|
|
sts = readb(sport->port.membase + UARTSR1);
|
|
|
|
+ crdma = readb(sport->port.membase + UARTCR5);
|
|
|
|
|
|
- if (sts & UARTSR1_RDRF) {
|
|
|
|
|
|
+ if (sts & UARTSR1_RDRF && !(crdma & UARTCR5_RDMAS)) {
|
|
if (sport->lpuart_dma_use)
|
|
if (sport->lpuart_dma_use)
|
|
lpuart_prepare_rx(sport);
|
|
lpuart_prepare_rx(sport);
|
|
else
|
|
else
|
|
lpuart_rxint(irq, dev_id);
|
|
lpuart_rxint(irq, dev_id);
|
|
}
|
|
}
|
|
- if (sts & UARTSR1_TDRE &&
|
|
|
|
- !(readb(sport->port.membase + UARTCR5) & UARTCR5_TDMAS)) {
|
|
|
|
|
|
+ if (sts & UARTSR1_TDRE && !(crdma & UARTCR5_TDMAS)) {
|
|
if (sport->lpuart_dma_use)
|
|
if (sport->lpuart_dma_use)
|
|
lpuart_pio_tx(sport);
|
|
lpuart_pio_tx(sport);
|
|
else
|
|
else
|
|
@@ -1106,6 +1106,7 @@ static int lpuart_startup(struct uart_port *port)
|
|
setup_timer(&sport->lpuart_timer, lpuart_timer_func,
|
|
setup_timer(&sport->lpuart_timer, lpuart_timer_func,
|
|
(unsigned long)sport);
|
|
(unsigned long)sport);
|
|
temp = readb(port->membase + UARTCR5);
|
|
temp = readb(port->membase + UARTCR5);
|
|
|
|
+ temp &= ~UARTCR5_RDMAS;
|
|
writeb(temp | UARTCR5_TDMAS, port->membase + UARTCR5);
|
|
writeb(temp | UARTCR5_TDMAS, port->membase + UARTCR5);
|
|
}
|
|
}
|
|
|
|
|