Thread (7 messages) 7 messages, 4 authors, 2018-09-20

RE: [PATCH v1] tty: serial: imx: enable IDDMAEN for the last tail data

From: Andy Duan <hidden>
Date: 2018-09-20 10:33:39
Also in: lkml

From: Lucas Stach <l.stach@pengutronix.de> Sent: 2018年9月20日 17:40
Am Donnerstag, den 20.09.2018, 08:39 +0000 schrieb Robin Gong:
quoted
quoted
-----Original Message-----
From: Uwe Kleine-König <redacted>
Sent: 2018年9月20日 15:55
To: Robin Gong <redacted>
Cc: jslaby@suse.com; Andy Duan <redacted>;
linux-serial@vger.kernel.org; linux-kernel@vger.kernel.org; dl-
linux-imx [off-list ref]; kernel@pengutronix.de
Subject: Re: [PATCH v1] tty: serial: imx: enable IDDMAEN for the
last tail data

Hello,

On Thu, Sep 20, 2018 at 11:26:00PM +0800, Robin Gong wrote:
quoted
enable IDDMAEN in UCR4 to let sdma script has the chance to detect
the idle status and transfer the last tail data with the interrupt
notifying uart driver.Otherwise, the last dma done interrupt of
the tail data in rxfifo whose size is less than watermark may
never be received by uart driver.
Is this a theoretic issue? Or does it fix a real problem?

If the former I'd say UCR1_ATDMAEN being set should prevent this
stall.
It's a real fix, you will see 'timeout We read 0 byte' with the
attached stress test running on i.mx7d or i.mx6 if no this patch
applied.
' while [ 1 ]; do /unit_tests/UART/mxc_uart_stress_test.out
/dev/ttymxc5 2000000 D L 100 100 L; done &'
Please make sure dma enabled on ttymxcX for your test, and sdma
firmware setup in your rootfs /lib/firmware/imx/sdma/sdma-imx6q.bin
or
quoted
/lib/firmware/imx/sdma/sdma- imx7d.bin.
You can get sdma firmware from below:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
t
quoted
.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ffirmware%2Flin
ux-&amp
quoted
;data=02%7C01%7Cfugang.duan%40nxp.com%7C213076f6d1114148b5
ce08d61edcfb
quoted
88%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636730331
814804545&amp
quoted
;sdata=d0uZMjLc%2FrIae3Wd6PWtX2gEGlvZcUjPBVqKK9550jg%3D&amp
;reserved=0
quoted
firmware.git/tree/imx/sdma
Please see commit 905c0decad28402aa166975023fb88c8f62f93c8 on
why using the idle detect together with with SDMA is wrong. We don't
want to re- introduce the broken behavior.
The patch just want to use idle timer to stop SDMA transfer using the new ram script, whose action is not the same as rom script.
Sdma rom script how to stop sdma transfer if only one byte in rx FIFO that trigger SDMA request ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help