This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

(Linux) PCIe: EDMA read from RC memory space reads zeros (C6655)

I have the following issue: I am using the PCIe driver example from the MCSDK (\mcsdk_2_01_02_06\tools\boot_loader\examples\pcie\linux_host_loader) which programs the EDMA to transfer a block of memory from the RC to the EP (DSP). I have 2 setups, one where the entire example works, one where I am having an issue.

Setup A):  x86 RC, running Xubuntu 12.04LTS (32-bit). The EP is a EVM6657. The example works as advertised:

  1.  the program sets up the EDMA which reads data from the x86 host memory (into DSP DDR).
  2. The generates an IRQ interrupt on the DSP (by manually writng to the MSI raw IRQ regs).
  3. The DSP modifies the data in the IRQ handler and then sends an MSI to the host.
  4. In the host its IRQ handler, an EDMA transfer is started to transfer the modified block of data back to the host.
  5. Lastly the data is verified.

That all works.

Setup B): ARM (Marvel Armada 370) RC, running Linux kernel 3.12.8 with C6655 EP. The entire example works as above, but....data transferred from host to DSP (so an EDMA read) is always 0, regardless of the original data.

I found some posts which report a similar issue, but could not find a resolution. In my case, even a  transfer of 4 bytes results in all bytes written to be 0.

One difference in run into while running the code wihc I suspect might have something todo with the issue is the function pci_set_dma_mask(). In the example and in Setup A) I pass the mask 0xFFFF FFF0, but on the ARM platform that value is not accepted, so I am passing in 0xFFFF FFFF (= DMA_BIT_MASK(32)). Could this have something todo with the issue? I looked at the actual purpose of the field, and it seems to check that the value of the mask is equal or larger than "arm_dma_limit" (see dma-mapping.c). I did not get much further than that.

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/152253.aspx?pi199607=2

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/336123.aspx

Your help is hugely appreciated!

Dirk