summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2014-11-04 09:02:56 +0100
committerStefan Agner <stefan@agner.ch>2014-11-04 09:02:56 +0100
commitbe90c0de393a7105c65cd70eb0153606ca0b8c0c (patch)
tree084a7ebb441e03f9dd570e866d20d9d5d3f98bd7
parent5181e55e9daadd3ca5737b84fdb73ad08a1bb47b (diff)
-rw-r--r--arch/arm/boot/dts/vf-colibri-eval-v3.dtsi2
-rw-r--r--drivers/tty/serial/fsl_lpuart.c20
2 files changed, 17 insertions, 5 deletions
diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
index f06e42db0b7e..3d346cf67512 100644
--- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
@@ -58,7 +58,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_esdhc1>;
bus-width = <4>;
- status = "okay";
+ status = "disabled";
};
&dcu0 {
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index bb8316587917..ff9a0a1fc3c5 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -464,11 +464,12 @@ static void lpuart_dma_rx_complete(void *arg)
async_tx_ack(sport->dma_rx_desc);
spin_lock_irqsave(&sport->port.lock, flags);
-
+printk("D\n");
sport->dma_rx_in_progress = 0;
lpuart_copy_rx_to_tty(sport, port, FSL_UART_RX_DMA_BUFFER_SIZE);
tty_flip_buffer_push(port);
lpuart_dma_rx(sport);
+ mod_timer(&sport->lpuart_timer, jiffies + sport->dma_rx_timeout);
spin_unlock_irqrestore(&sport->port.lock, flags);
}
@@ -482,6 +483,8 @@ static void lpuart_timer_func(unsigned long data)
unsigned char temp;
int count;
+ printk("T\n");
+
del_timer(&sport->lpuart_timer);
dmaengine_pause(sport->dma_rx_chan);
dmaengine_tx_status(sport->dma_rx_chan, sport->dma_rx_cookie, &state);
@@ -506,9 +509,11 @@ static inline void lpuart_prepare_rx(struct lpuart_port *sport)
unsigned char temp;
spin_lock_irqsave(&sport->port.lock, flags);
+ if (timer_pending(&sport->lpuart_timer))
+ printk("pend, dma %d\n", sport->dma_rx_in_progress);
- sport->lpuart_timer.expires = jiffies + sport->dma_rx_timeout;
- add_timer(&sport->lpuart_timer);
+ //sport->lpuart_timer.expires = jiffies + sport->dma_rx_timeout;
+ mod_timer(&sport->lpuart_timer, jiffies + sport->dma_rx_timeout);
lpuart_dma_rx(sport);
temp = readb(sport->port.membase + UARTCR5);
@@ -775,7 +780,9 @@ static irqreturn_t lpuart_int(int irq, void *dev_id)
else
lpuart_txint(irq, dev_id);
}
-
+ sts = readb(sport->port.membase + UARTSFIFO);
+ if (sts & UARTSFIFO_RXOF)
+ printk("UARTx_SFIFO %02x\n", sts);
return IRQ_HANDLED;
}
@@ -1102,6 +1109,11 @@ static int lpuart_startup(struct uart_port *port)
temp |= (UARTCR2_RIE | UARTCR2_TIE | UARTCR2_RE | UARTCR2_TE);
writeb(temp, sport->port.membase + UARTCR2);
+ temp = readb(sport->port.membase + UARTCFIFO);
+ temp |= UARTCFIFO_RXOFE;
+ writeb(temp, sport->port.membase + UARTCFIFO);
+
+
spin_unlock_irqrestore(&sport->port.lock, flags);
return 0;
}