UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor charlie5902
Visitor
496 Views
Registered: ‎08-28-2018

XDMA Petalinux basics questions

Jump to solution

Ok so I've read through most of the posts from folks having trouble getting started with Axi DMA and DMA Engine in Petalinux. I am still missing something.

My hardware has an AXI DMA with TX and RX connected in loopback and everything connected. axi_dma_o and axi_dma_1 both show up properly in the device tree.

I want to be able to request a channel from a generic client driver. I have read the DMA Engine API docs and looked at the axi dma test example.

What exactly do I need to do to get success in my driver for requesting a channel?

I suspect I am missing a device tree entry with a .compatible entry for my driver - is that necessary for a generic client driver?

If I need a device tree entry for my driver - what are the contents needed for the entry?

This is Vivado/Petalinux  2018.2.

 

 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
463 Views
Registered: ‎04-24-2017

Re: XDMA Petalinux basics questions

Jump to solution

Hi @charlie5902,

Device-tree contents depends on how you write the driver and pass property values to driver.

Compatible string is not 100% mandatory it is just to specify the manufacture and model(device, ip or peripheral) associated with drivers. 

I have attached the attached the 2018.1 axi-dma project-spec files for ZCU102 board you can use as reference. For 2018.2 it will be the same no changes in device-tree.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

3 Replies
Moderator
Moderator
464 Views
Registered: ‎04-24-2017

Re: XDMA Petalinux basics questions

Jump to solution

Hi @charlie5902,

Device-tree contents depends on how you write the driver and pass property values to driver.

Compatible string is not 100% mandatory it is just to specify the manufacture and model(device, ip or peripheral) associated with drivers. 

I have attached the attached the 2018.1 axi-dma project-spec files for ZCU102 board you can use as reference. For 2018.2 it will be the same no changes in device-tree.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

Visitor charlie5902
Visitor
452 Views
Registered: ‎08-28-2018

Re: XDMA Petalinux basics questions

Jump to solution

Thanks so much for the great info and reference files.

I am getting closer but still not able to request my channels in my driver. I have the device tree mods as specified and requesting the channel names as specified in the device tree but dma_request_slave_channel returns NULL.

To try to troubleshoot more, I've enabled the axidmatest module. I've added the device tree node to enable it, build and when I load the module I get a segmentation fault in the probe function.

Any suggestions on how to proceed to troubleshoot this?

0 Kudos
Visitor charlie5902
Visitor
442 Views
Registered: ‎08-28-2018

Re: XDMA Petalinux basics questions

Jump to solution

So continuing to plug away at this - I am now able to request channels in my driver. I am suspecting failure was because I did not have the DMA interrupt connected in my hardware design. I connected it up, rebuilt and everything seems to be better now.

On to the next step of setting up a dma transaction - hoping things are going to get easier from here!

Thanks for help so far!!

0 Kudos