We're using a 6sl based board with Linux 4.1. We have 32-bit EIM transactions working using individual memory read/writes. We also have SDMA from host memory to EIM target (an FPGA) partially working but we're seeing unexpected large gaps within the SDMA transfers. For example, if we transfer 64 bytes in 32-bit mode, with 66MHz EIM clock, instead of seeing 16 consecutive transfers, we see the transfer split into 1 batch of 8 writes and then a pause of about 625ns and only then the 2nd batch of remaining 8 writes.
I've attached a scope screenshot.
I've tried changing various parameters within the EIM_GCR/CS1WCRx/etc registers. Tried tweaking burst length BL, write continuous, WC and others but the gap between the 2 sequences remains the same. That leaves the 2 suspect areas as being the SDMA test driver, or the SDMA AP2AP script which is in the sdma binary in 4.1.
My current EIM settings:
0x021B8018: 00930089 00001100 0F010000 00000000
0x021B8028: 01040400 00000000
My test dmaengine setup is:
m2m_dma_data.dma_request = 0;
m2m_dma_data.dma_request2 = 0;
m2m_dma_data.peripheral_type = IMX_DMATYPE_MEMORY;
m2m_dma_data.priority = DMA_PRIO_HIGH;
dma_m2m_chan = dma_request_channel(dma_m2m_mask, dma_m2m_filter,
dma_m2m_config.direction = DMA_MEM_TO_MEM;
dma_m2m_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
dma_m2m_config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
dma_m2m_config.src_maxburst = 64;
dma_m2m_config.dst_maxburst = 64;
dma_m2m_desc = dma_m2m_chan->device->device_prep_dma_memcpy(dma_m2m_chan, targetaddr, rbuf, 64, 0);
I've tried varying the burst size but it has no effect. I noticed some other postings on the forum which seem to suggest problems with EIM transfers, I'm wondering if there's an underlying problem. EIM performance issue on iMX6
Also, does anyone know if there's a way to develop and add our own SDMA scripts to fix the bugs/problems with the existing FSL scripts? I tried asking FSL, and initially it seemed positive but now the request thread seems to be dead: Adding ap_2_ap_fixed into sdma rom