Re: [LEDE-DEV] [PATCH] imx6: disable dma on uart
On 02/22/2018 12:20 PM, Koen Vandeputte wrote: > When this target got updated to 4.14, this patch got removed to > re-evaluate if it was still needed. > > Extensive testing now shows this issue is still present. > Let's re-add the patch to fix it for now. > > As the uart bus is very low bandwidth .. performance impact is negligible. > > Boot log: > > [ 22.513051] imx-uart 202.serial: DMA transaction error. > [ 22.522721] imx-uart 202.serial: DMA transaction error. > An alternative solution is to add the following to the uart's device tree definition: dma-names = "", ""; e.g. { pinctrl-names = "default"; pinctrl-0 = <_uart1>; dma-names = "", ""; status = "okay"; }; Regards, Bas. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] imx6: disable dma on uart
On 2018-03-08 11:00, Koen Vandeputte wrote: > > > On 2018-02-22 12:44, Felix Fietkau wrote: >> On 2018-02-22 12:20, Koen Vandeputte wrote: >>> When this target got updated to 4.14, this patch got removed to >>> re-evaluate if it was still needed. >>> >>> Extensive testing now shows this issue is still present. >>> Let's re-add the patch to fix it for now. >>> >>> As the uart bus is very low bandwidth .. performance impact is negligible. >>> >>> Boot log: >>> >>> [ 22.513051] imx-uart 202.serial: DMA transaction error. >>> [ 22.522721] imx-uart 202.serial: DMA transaction error. >>> >>> As a sidenote: >>> The patch mentiones an issue with RS485, but the bootlog >>> errors above were recorded with the uart ports in standard RS232 mode. >>> >>> Compile/Run-tested on imx6/GW5200 >>> >>> Signed-off-by: Koen Vandeputte>> Could you please also report this issue upstream and send a patch that >> makes it possible to disable DMA via DT and/or kconfig? > Bugreport was filed some time ago [1] > No response so far .. Did you send it to the relevant mailing lists as well? - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] imx6: disable dma on uart
On 2018-02-22 12:44, Felix Fietkau wrote: On 2018-02-22 12:20, Koen Vandeputte wrote: When this target got updated to 4.14, this patch got removed to re-evaluate if it was still needed. Extensive testing now shows this issue is still present. Let's re-add the patch to fix it for now. As the uart bus is very low bandwidth .. performance impact is negligible. Boot log: [ 22.513051] imx-uart 202.serial: DMA transaction error. [ 22.522721] imx-uart 202.serial: DMA transaction error. As a sidenote: The patch mentiones an issue with RS485, but the bootlog errors above were recorded with the uart ports in standard RS232 mode. Compile/Run-tested on imx6/GW5200 Signed-off-by: Koen VandeputteCould you please also report this issue upstream and send a patch that makes it possible to disable DMA via DT and/or kconfig? Bugreport was filed some time ago [1] No response so far .. Thanks, - Felix [1] https://bugzilla.kernel.org/show_bug.cgi?id=198889 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] imx6: disable dma on uart
When this target got updated to 4.14, this patch got removed to re-evaluate if it was still needed. Extensive testing now shows this issue is still present. Let's re-add the patch to fix it for now. As the uart bus is very low bandwidth .. performance impact is negligible. Boot log: [ 22.513051] imx-uart 202.serial: DMA transaction error. [ 22.522721] imx-uart 202.serial: DMA transaction error. As a sidenote: The patch mentiones an issue with RS485, but the bootlog errors above were recorded with the uart ports in standard RS232 mode. Compile/Run-tested on imx6/GW5200 Signed-off-by: Koen Vandeputte--- .../imx6/patches-4.14/210-disable-uart-dma.patch | 23 ++ 1 file changed, 23 insertions(+) create mode 100644 target/linux/imx6/patches-4.14/210-disable-uart-dma.patch diff --git a/target/linux/imx6/patches-4.14/210-disable-uart-dma.patch b/target/linux/imx6/patches-4.14/210-disable-uart-dma.patch new file mode 100644 index ..6abbb9330188 --- /dev/null +++ b/target/linux/imx6/patches-4.14/210-disable-uart-dma.patch @@ -0,0 +1,23 @@ +Based on following upstream patch by Tim Harvey (Gateworks): + +https://github.com/Gateworks/openwrt/commit/80a01b6582f94c4547f39d3a25e0a1e9b6eb9877 + +TX complete DMA messages are getting missed. +This is also currently an issue in mainline. +For now we will disable DMA in serial/imx.c. + +This resolves an issue encountered with RS485 transmit. + +--- a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c +@@ -1268,10 +1268,6 @@ static int imx_startup(struct uart_port + + writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); + +- /* Can we enable the DMA support? */ +- if (!uart_console(port) && !sport->dma_is_inited) +- imx_uart_dma_init(sport); +- + spin_lock_irqsave(>port.lock, flags); + /* Reset fifo's and state machines */ + i = 100; -- 2.7.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev