I have an issue with SPI communication.
Information about my system
cat /etc/issue The Angstrom Distribution Angstrom v2017.12 - Kernel cr7_Console-Image 2.8b3 20181115 uname -a Linux cr7 4.9.87-2.8.3+g1341129ea22d #1 SMP Mon Mar 18 09:50:27 UTC 2019 armv7l armv7l armv7l GNU/Linux
Description of Issue
I have my custom Linux kernel driver for DSP. It communicate with 6 DSPs through SPI bus by means of spi_write() functions.
Driver was taken from AT91SAM9G20 plaftorm, where it works flawless.
But, i.MX6 SPI driver periodically throw errors like
[ 2485.327595] spi_master spi1: I/O Error in DMA RX [ 2485.344001] gs_mgms_dsp spi1.2: SPI transfer failed: -110 [ 2485.361039] spi_master spi1: failed to transfer one message from queue [ 2485.378422] gs_mgms_dsp spi1.2: SPI read error.
Sometimes this happens due to timeouts for 512 byte DMA transfers, sometimes due timeouts for 1 byte PIO transfers.
As higher the SPI bus frequency, then more often errors occur.
At 16 MHz, they occur after some seconds from start of communication.
At 12 MHz, they occur once per 3-4 hours.
I think, issue is in drivers/spi/spi-imx.c.
Maybe this is a known issue and somebody know about patch to fix it?