Re: DMA templat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is one way, there are others.

/* Setup */
kern_addr = pci_alloc_consistent(dev,size,&bus_addr);

/* pass bus_addr to other device; that device can now
    read from this devices memory  
    Just copy your data to kern_addr to be copied and signal
    the other device to fetch it.
 */

/* Tear down */
pci_free_consistent(dev,size,kern_addr,bus_addr);

>  Could any one give me pointer for DMA(example code ). I badly need it

Everybody needs his solution badly :)

-- 
ash nazg durbatulûk, ash nazg gimbatul,
ash nazg thrakatulûk agh burzum-ishi krimpatul

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux