LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   DMA driver for linux 2.6.14 (https://www.linuxquestions.org/questions/linux-newbie-8/dma-driver-for-linux-2-6-14-a-539530/)

linuxguy_72 03-22-2007 12:18 AM

DMA driver for linux 2.6.14
 
Hi everyone,

Actually I am beginner to Linux Enviromnent and presently working on porting my existing DMA device driver to Linux 2.6.14. I am working on this since last 1 month but still could not find the right approach for a jumpstart.
My earlier DMA driver which I tested on ARM926EJS on Non-OS and VxWorks have couple of DMA API's which are exposed to end user application. Just to give you breif snapshot of 1 simple DMA API:
DMA_Copy(DMA_channel Number,Source Address, Dest. Address, Size)

Now End user simply gives DMA channel number(which he already opened using other DMA API), source and destination addres of data buffer(say, placed in DDR) and any data size. My DMA driver internally configures some of the DMA hardware registers and can perform the DMA copy without any problem .

But in Linux, using ioclt calls now I can configure any DMA channel to open in kernel mode but my real problem starts when I need to pass source and destination address to perform any DMA copy from user to kernel mode. Bcoz internally driver is working at kernel mode and needs kernel Virtual address to perform any DMA copy and end user is passing User mode addresses.
So, Could anyone let me know what should be the right way to approach this driver implementation in Linux. I am also following DMA chapter of Linux Device Driver 3rd edition by Rubini but finding it really cumbersome to grasp.So it would be great if I can expect your comments on this driver implementation


All times are GMT -5. The time now is 10:16 AM.