I am using the zynq ZCU102 SOC. I have a memory mapped custom AXI peripheral on the the PL and petalinux running on the PS. I have written the code for a device driver to transfer data from the PS to the IP on the PL. Now I want to offload these transfers to a DMA.
As I understand, for memory mapped to memory mapped transfers, an AXI CDMA must be used.
As I understand there are 2 ways of configuring a DMA through xilinx driver APIs. One, to invoke the low level DMA driver APIs directly. The other is to call the DMA engine APIs which I believe are one level higher than the low level DMA driver APIs. Please correct me if I am wrong.
I am trying to invloke the DMA engine in my device driver. Are these the right APIs to call? And is the order correct?
I don't need the scatter-gather mode for my application. But the API "dmaengine_prep_slave_sg()" seems to suggest the usage of the scatter-gather mode. I am not able to find any other API for simple mode. Do I continue with the above API? Or is there an alternate API I can use?
Also can anyone please guide me regarding the connection in Vivado? Do I enable scatter-gather mode or not?(I'm assuming it needs to be enabled for the usage of "dmaengine_prep_slave_sg()") If enabled where does the pin "M_AXI_SG" need to be connected?
And where does the pin "cdma_introut" need to be connected? Is this for invoking the callback function?
Any help is highly appreciated. Pointers to any sample code demonstrating the usage of the DMA Engine APIs would be very helpful. Please correct me if any of the assumptions above are incorrect.