MCU : imx6 solo
Kernel : L3.0.35_4.1.0
EIM Setting : 16bit, Burst, Continuous BCLK
- When I use memcopy from ddr to eim(using ioremap), memcopy function is good.
- So, I think there is no problem with eim settings.
SDMA test sample : unitest - mxc_sdma_memcopy_test.c sample source
- mem to mem test is good using sample source. (from DDR to DDR)
SDMA firmware version is .1(imx6q)
My plan is data transmission from DDR to EIM(FPGA) using SDMA.
I made two attempts.
try 1 :
SDMA Type : IMX_DMATYPE_MEMORY
I changed the address of wbuf or rbuf to EIM address(using ioremap to change to virtual memory), but chip select not responding.
Simply, I just modified the memory address(rbuf->eim virtual address or wbuf->eim virtual address) in the sample source.
try 2 :
SDMA Type : IMX_DMATYPE_MEMORY or IMX_DMATYPE_EXT
dma_m2m_config_rx.direction = DMA_DEV_TO_MEM;
dma_m2m_config_rx.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
dma_m2m_config_rx.src_addr = EIM_CS0_BASE_ADDR; ( EIM_CS0_BASE_ADDR is 0x08000000;phys addr)
dma_m2m_config_rx.src_maxburst = 16;
sg_set_buf(&sg, wbuf, SDMA_BUF_SIZE);
ret = dma_map_sg(NULL, sg, 1, dma_m2m_config.direction);
dma_m2m_desc = dma_m2m_chan->device->device_prep_slave_sg(dma_m2m_chan,sg, 1, dma_m2m_config.direction, 1);
Chip select soes not work, too.
Can I access the EIM throuhg SDMA? If not, is DMA possible?
Can I get an SDMA sample source from EIM to DDR?
If SDMA is not able to use EIM, is there any other way to resuce cpu usage for memory copy?