[PATCH v4 06/12] serial: imx: setup fifo waterlevel before enabling aging timer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The aging timer fires if there are characters in the RX fifo but the
water level isn't reached yet. Make sure that the waterlevel is
configured before the aging timer is enabled to trigger a DMA request
(UCR1_ATDMAEN).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 drivers/tty/serial/imx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 23d591897e82..9b92c49fc174 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1239,13 +1239,13 @@ static void imx_enable_dma(struct imx_port *sport)
 {
 	u32 ucr1;
 
+	imx_setup_ufcr(sport, TXTL_DMA, RXTL_DMA);
+
 	/* set UCR1 */
 	ucr1 = imx_uart_readl(sport, UCR1);
 	ucr1 |= UCR1_RXDMAEN | UCR1_TXDMAEN | UCR1_ATDMAEN;
 	imx_uart_writel(sport, ucr1, UCR1);
 
-	imx_setup_ufcr(sport, TXTL_DMA, RXTL_DMA);
-
 	sport->dma_is_enabled = 1;
 }
 
-- 
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux