I'm using a 6sl board with linux 3.0.35. I have an FPGA connected via EIM using CS1. I'm able to talk to the FPGA using regular host memory read/writes using mmap of /dev/mem physical address 0x0C00_0000 (CS1). I see the 6sl generate the expected EIM cs1 and read/write cycles. So that part is working fine and I'm very happy with that.
I chose IMX_DMATYPE_MEMORY since I believe host memory to EIM memory target is memory type transaction. I have not tried other options like IMX_DMATYPE_EXT , IMX_DMATYPE_FIFO_MEMORY since I'm not sure they apply. Please let me know if I should try those.
In above, I hardcoded dst_addr as 0x0C00_0000 because that's the physical address for the EIM CS1 target. When I try this, the sequence seems to execute as expected (completion seen as shown by debug output below) but on the EIM bus I do not see CS1 assert or any activity occur. That's the part I have not been able to figure out. I'm not able to get any activity out on the EIM bus using SDMA.
Full source of the test is attached.
I am hoping to find a working example of SDMA host memory to EIM for 6sl 3.0.35 (or similar). If anyone has any debug suggestions or advice, I'd be very grateful!
Thanks for your reply. But that patch (0003-ENGR-Add-sdma-memory-to-memory-copy-function-for-ker.patch.txt) is just to convert from 3.0.35 to 3.5/3.10.x. As I mentioned in my post, I'm already using the same mxc_sdma_memcopy_test.c. My post attached the exact version of mxc_sdma_memcopy_test.c.zip that I'm using.
Perhaps you can help me to find out if DMA_MEM_TO_DEV and IMX_DMATYPE_MEMORY is the correct setting to use for host memory to EIM cs1 target (fpga) or if I should be using DMA_MEM_TO_MEM instead?
Both do not appear to trigger any EIM activity on chipselect 1 or any other chipselect.
Do you have any working example for mx6 that shows working DMA to EIM? (ie: NOT sdma for plain ram memory-to-memory copy).
That is identical to the mxc_sdma_memcopy_test.c I used. As I mentioned, it does not perform DMA to EIM which is what I'm trying to get an example for.
I also checked the sdk_sdma.zip. I found a userspace sample for memory-to-memory copy via SDMA. I can see there are some samples that do SDMA to UART, IRAM and others but don't see a sample for EIM.
This seems logical to me but I'm wondering if there's something wrong with that approach.
just to use existing scripts and drivers using them provided by nxp in its official releases.
I have a similiar case with a transfer from fpga to memory that need dma access,and I don't figure out how to work with that. I hope you can give us some help! Thanks very much!
"just to use existing scripts and drivers using them provided by nxp in its official releases."
I've been asking for an example of an existing script/driver that uses SDMA to transfer host memory to an EIM target, eg: EIM CS1 (0x0C00_0000 address). So far, I have not found any. Could you say clearly whether such an script/driver exists? I am happy and ready to use nxp script/driver but so far none seems to exist for EIM. Please clarify.
I have a similia case with yours. And I use mmap to resolve this problem.You can have a try!
Thanks for your message. For me, yes, communication with fpga on EIM CS1 via mmap of 0x0C00_0000 works but only for individual read/writes and the speed of transfer for large data is low. That is why I would like to use SDMA to accelerate bulk transfers. Are you using SDMA to EIM and if so how do you do SDMA using mmap?
I have the same problem about dma,and I did some research on the internet but could not find a solution.I also have try to use exynos4412 of samsung, but I failed.I have used Cortex-A8 to do the same thing the last year. It worked well. now,I am not clear why cortex-A9 doesn't work.So I am attempting to use mmap to deal it now but I have other problem that the data transfered is incorrect. My method is mmap and memcpy.I hope that we can solve the problem together! latly, I am a chinese graduate student, please forgive me for my poor englis!