Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21602 Discussions

How to finish the altpciechdma.c driver?

Altera_Forum
Honored Contributor II
5,481 Views

I've downloaded the altpciechdma.c driver for the Altera Arria GX dev kit. 

The char part of it is not yet finished (due to the comments). 

And a module is missign "mapper_user_to_sg.h". 

Smb has tried to finish this part of the driver by himself? 

Or maybe I've missed the "mapper_user_to_sg.h" module? 

I need to talk to the driver from userspace. 

(Using LInux 2.6.25)
0 Kudos
22 Replies
Altera_Forum
Honored Contributor II
345 Views

Hi, 

 

the driver had enough code to test the connection between the FPGA and the kernel of the system. If I am not wrong, those functions were meant to provide data transfer between kernel space and user space. The functions that were allocated in those files are commented in the general code (not used).  

 

If your intention is to provide access from user space, then you should search on driver development and check functions such as copy_to_user and copy_from_user. As I did in my case, you have to finish it up. 

 

I hope it was of any help. 

 

P.D. I couldn't find it either
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

Hi, 

 

Thank you for reply. 

I find the driver's write operation is use anther way to do the DMA map,and i can't verify if that map way have more efficiency. 

 

The driver author Leon also replied: 

We found that we could not make user SGDMA work reliably with the IP  

provided by Altera. 

Direct I/O user scatter-gather DMA was introduced in a commercial PCI  

Express IP core for Altera FPGA's: 

http://www.lancero.eu.com/lancero-pcie-sgdma/
0 Kudos
Reply