Hi illini,
i'm trying to get the DMA working on a MPC8313ERDB platform, and i can´t.
You says that you have got it working.
I have a slave only PCI device and i would like to read its IOMEM with the DMA.
I program the DMA and it finishes without error but the result is not ok.
I'm allocating a buffer with dma_alloc_coherent and i put the physical address in the destination address, the source address i have setting is the one returned by pci_resource_start(dev, MMIO_INDX).
What am i doing wrong??
Please could you send an example?
Thanks in advance.
I am running Linux 2.6.26. The type of memory is very important. I malloc memory for DMA with the GFP_DMA and GFP_KERNEL flags.
I would also check if there are any restrictions as to DMA destination/source and length. For the MPC8272, when transferring data to the 60x space using PCI DMA, the destination address and byte counts must be multiples of 8.
Always use physical addresses in the segment descriptors.