shell.albert
Member level 4
is there someone know how to program DMA operations in linux on x86 platform?
few days ago ,i got a mission to finish a PCI device driver in linux,the destination board is x86.now,i've already finish the basic PCI register read & write and it works well.i get the BAR0 physical address through APIs pci_resource_get(),pci_resource_end(),mapping it to kernel virtual address with ioremap(),then i can read & write the BAR0 address space.the next step,i should execute DMA data transfer using DMA.but i don't know how to program DMA in linux ?
can experts give some suggestions?
thanks in advance.
- - - Updated - - -
i search the code using google on web,but the materials are not explain clearly.
can someone give me an example code here?
or draw a basic flow-chart to show the call ordering of DMA APIs??
few days ago ,i got a mission to finish a PCI device driver in linux,the destination board is x86.now,i've already finish the basic PCI register read & write and it works well.i get the BAR0 physical address through APIs pci_resource_get(),pci_resource_end(),mapping it to kernel virtual address with ioremap(),then i can read & write the BAR0 address space.the next step,i should execute DMA data transfer using DMA.but i don't know how to program DMA in linux ?
can experts give some suggestions?
thanks in advance.
- - - Updated - - -
i search the code using google on web,but the materials are not explain clearly.
can someone give me an example code here?
or draw a basic flow-chart to show the call ordering of DMA APIs??