LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-30-2017, 03:28 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Rep: Reputation: 23
DMA from kernel buffer to HW


Hello,

Using __get_free_pages I'm allocating a space in kernel.
This space is mapped also to user space so application can write data to it.

Upon IOCTL request from application, the device driver is writing the buffer to HW with DMA.

The DMA controller is part of the FPGA, not in the CPU. The DMA is programmed by writing few registers to HW.

In this scenario, should I need any kernel's DMA API ? Why ?
For example: dma_map_single

Thank you,
Zvika
 
Old 07-02-2017, 10:17 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
The DMA code is for using the hardware as a general purpose data mover. You just need to map the address and write it to the FPGA.
 
Old 07-07-2017, 02:13 PM   #3
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Thank you !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Device DMA Buffer vs RX Queue ankit_singh Linux - Newbie 0 10-01-2015 02:44 PM
Device DMA Buffer vs RX Queue ankit_singh Linux - Networking 0 09-30-2015 02:45 PM
DMA Ring buffer vahu002 Linux - Networking 0 12-08-2010 11:09 AM
Allocate and use DMA buffer orback Linux - Kernel 1 03-09-2010 03:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration