diff options
author | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2018-11-05 17:41:00 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2018-11-06 11:49:55 +0100 |
commit | 44084d89f2b0f60ba6d0d480ebf4d944c1ebe57d (patch) | |
tree | 8b012d176cfcb408e2d8e738bf00f4376fdd9137 /target/linux | |
parent | 779b89c7577de4d7615e2975341fc8ffc580ca09 (diff) | |
download | upstream-44084d89f2b0f60ba6d0d480ebf4d944c1ebe57d.tar.gz upstream-44084d89f2b0f60ba6d0d480ebf4d944c1ebe57d.tar.bz2 upstream-44084d89f2b0f60ba6d0d480ebf4d944c1ebe57d.zip |
imx6: fix DMA transaction errors
Following errors were seen in the past on imx6 when using serial:
[ 22.617622] imx-uart 2020000.serial: DMA transaction error.
[ 22.623228] imx-uart 2020000.serial: DMA transaction error.
[ 22.628826] imx-uart 2020000.serial: DMA transaction error.
[ 22.648951] imx-uart 2020000.serial: DMA transaction error.
[ 22.654558] imx-uart 2020000.serial: DMA transaction error.
[ 22.660156] imx-uart 2020000.serial: DMA transaction error.
Which is the reason why DMA for the serial ports
got disabled in commits:
efb362cd93b0 ("imx6: disable dma on uart")
3b4241071dd4 ("imx6: disable UART dma")
As indicated on mailinglist discussion, the cause seems to be
the usage of very old SDMA firmware which is present in the soc:
[ 0.624302] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[ 0.624318] imx-sdma 20ec000.sdma: Falling back to user helper
[ 64.531607] imx-sdma 20ec000.sdma: external firmware not found, using ROM firmware
This patch adds the new firmware binary. (2196 bytes)
It is required to embed the binary into the kernel image, as it
gets loaded very early in the boot process where the rootfs is not
available yet:
[ 0.622966] imx-sdma 20ec000.sdma: loaded firmware 3.3
Extended testing shows that the DMA errors are not seen anymore
when using this newer firmware version.
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/imx6/config-4.14 | 2 | ||||
-rw-r--r-- | target/linux/imx6/files/firmware/imx/sdma/sdma-imx6q.bin | bin | 0 -> 2196 bytes | |||
-rw-r--r-- | target/linux/imx6/patches-4.14/210-disable-uart-dma.patch | 23 |
3 files changed, 2 insertions, 23 deletions
diff --git a/target/linux/imx6/config-4.14 b/target/linux/imx6/config-4.14 index 7829b4b507..52a98a0ba8 100644 --- a/target/linux/imx6/config-4.14 +++ b/target/linux/imx6/config-4.14 @@ -178,6 +178,8 @@ CONFIG_EXT4_FS_ENCRYPTION=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y CONFIG_EXTCON=y +CONFIG_EXTRA_FIRMWARE="imx/sdma/sdma-imx6q.bin" +CONFIG_EXTRA_FIRMWARE_DIR="firmware" CONFIG_FEC=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y diff --git a/target/linux/imx6/files/firmware/imx/sdma/sdma-imx6q.bin b/target/linux/imx6/files/firmware/imx/sdma/sdma-imx6q.bin Binary files differnew file mode 100644 index 0000000000..f0b5252a6f --- /dev/null +++ b/target/linux/imx6/files/firmware/imx/sdma/sdma-imx6q.bin 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 deleted file mode 100644 index 6abbb93301..0000000000 --- a/target/linux/imx6/patches-4.14/210-disable-uart-dma.patch +++ /dev/null @@ -1,23 +0,0 @@ -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(&sport->port.lock, flags); - /* Reset fifo's and state machines */ - i = 100; |