There are known issues with dma for the spi controller in the ls1021a. Specifically erratum A-011218 eDMA may not work with SPI. As a result, in linux I'm getting around 125k bytes/second transfer rate reading from nor flash memory and that's consuming 100% of one core.
The erratum offers a possible workaround using a second dummy dma channel.
Has anyone tried to implement this workaround for linux? There seems nothing in the kernel main line, which makes me wonder if it is realistic to do since kernel support is normally pretty good.
At the moment we are constrained to use the 4 series kernels and I have tried the latest version from 4.19.280. It appears there has been some further general development of spi in the 5 series so I'd also be interested to know if anyone is using the ls1021a with a 5 series kernel and if so whether the performance is any better.
A quick speed test would be "dd if=/dev/mtdxx of=/dev/null" and see what it says. I'm seeing over 500 seconds for 64M.
Thanks.