Author Topic: Access DMA from linux  (Read 2918 times)

stvo

  • Active Member
  • *
  • Posts: 9
Access DMA from linux
« on: September 01, 2017, 09:08:36 AM »
Hello,

i need to trans-fair some data from PS to PL, with Debian running on PS. As far as I know, since kernel 3.6, is the approach to use the Linux DMA API.
So i have to include dma-mapping.h or dmaengine.h in module or application.

My problem now is that in my petalinux build dir none of this files are present.
There is no files with dma, no dmaengine.h, dma-mapping.h or xilinx_dma.h ... except rdma in kernel include or rootfs /usr/include directory. But in the kernel 4.4  source are thoes files present and
In the kernel config alls options with the xilinx dma engine is enabled.

So what did go wrong in my build process, how do i get those DMA header files!?

Thanks,

Steve

Oleksandr Kiyenko

  • Sr. Member
  • ****
  • Posts: 408
Re: Access DMA from linux
« Reply #1 on: September 01, 2017, 12:20:35 PM »
Hello,

For petalinux 2017.1 include string should be like
#include <linux/dma/xilinx_dma.h>

Best regards
Oleksandr Kiyenko

stvo

  • Active Member
  • *
  • Posts: 9
Re: Access DMA from linux
« Reply #2 on: September 04, 2017, 09:47:58 AM »
Hello Oleksndr,

you miss understood me, i know what files and how to include.

My problem is that does files not exist in my Petalinux project build directory,  although in the kernel config xilinx dma is enabled!

I am using petalinux 2016.2

Best regards,
Steve

 

Oleksandr Kiyenko

  • Sr. Member
  • ****
  • Posts: 408
Re: Access DMA from linux
« Reply #3 on: September 04, 2017, 12:23:32 PM »
Hello,

in Petalinux this include files works only for kernel modules build. Looks like applicaltion build process not include kernel headers.

Best regards
Oleksandr Kiyenko