0

DMA engine is not responding correctly on PowerPC linux. When my PCIe device sends a read / write request to host, timeout happens. I have 1GB of RAM at lower address range. I have called the following functions

pci_device_enable()
pci_set_master()

DMA memory is allocated at 0x0F00_0000 and am able to access this memory from user space from host. How can I debug this problem. What could be the reason?

tshepang
  • 12,111
  • 21
  • 91
  • 136

2 Answers2

0

Please check if the PCIe device is using the correct address for the DMA memory. You only mention one address, but the address(es) of the DMA memory in user and kernel space will be different than the address of the DMA memory as seen from the PCIe bus.

You don't say how you are allocating the DMA memory and there are several different ways. For instance, if you use the following call to get the DMA memory, the dma_addr_t is the address to use in the PCIe device.

void *pci_alloc_consistent(struct pci_dev *dev, size_t size,
               dma_addr_t *dma_handle);
0

Check if you defined CONFIG_FSL_DMA part of your kernel config to compile the DMA driver. Also make sure your device tree has an entry for the DMA device on chip.

Mohan
  • 1