understanding DMA in PCI drivers

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

 



Hello,

I write a pci linux driver, and after reviewing some examples in
kernel, there is issue I am not sure about:
DMA seems to follow the following steps in PCI:
1.  driver allocate dma buffers and map them to BAR.
2. driver initialize device to be familiar with dma addresses.
3. tx from cpu to device: driver trigger dma, by writing into device BARs.
4. rx from device to cpu: device is responsible for triggering DMA
(driver does not do anything here)
5. tx/rx completion: interrupt from DMA (in cpu)
6. interrupt handler of section 5 above checks that device finished tx/rx.

Is the above understanding correct ?
1. As to 6, I am not sure about, is it that device knows that
transaction is finished (DMA is in soc , not device) ?
2. How does device triggers DMA from device to cpu, is it by simply
writing to BAR ?
3. How does device triggers DMA from cpu to device, is it by simply
reading from BAR ?

Thank you,
Ran



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux