lkml.org 
[lkml]   [2019]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Issues with i.MX SPI DMA transfers
On Thu, Mar 28, 2019 at 10:04:21AM +0300, Igor Plyatov wrote:
> Dear Uwe,
>
>
> > Hello Igor,
> >
> > On Wed, Mar 27, 2019 at 08:40:00PM +0300, Igor Plyatov wrote:
> > > please, help to resolve two issues with SPI DMA transfers at i.MX6Q
> > > platform.
> > >
> > > First issue is
> > >  [ 4465.008003] spi_master spi0: I/O Error in DMA RX
> > >
> > > Second issue is duplication for one of received bytes.
> > >
> > > Probably, these issues related to each one.
> > This is probably the same problem I hit some time ago. Check ERR009165
> > in the errata. You either need to disable DMA or need a fixed
> > sdma-Script.
>
> disabling of DMA is not an option, because high throughput required for SPI
> bus to communicate with DSPs.

Is this a theoretical reasoning, or is that backed by testing? People
here on the list already said things like:

The eCSPI appears to insert a 4 bit pause after each word in DMA
mode, not done in PIO mode, which can make DMA transfers 50%
slower than PIO.

You might want to read the thread
https://marc.info/?l=linux-spi&m=155191201208766&w=2
.

> I'm aware of ERR009165, but as I write some minutes earlier to list, spi0
> (alias for ecspi1) and spi1 (alias for ecspi2) work flawless, while spi4
> (alias for ecspi5) fails very fast.

As the issue is a timing race, it might depend on things like length of
the SPI lines, load on the data lines and other electrical properties.
So you might just be happy that spi0 and spi1 don't show the issue for
you. Or you didn't apply the "right" work load yet.

> Does same SDMA script used for all SPI interfaces or scripts are different?

As answered already before: The same script is used for all interfaces.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |

\
 
 \ /
  Last update: 2019-03-28 09:23    [W:2.173 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site