PowerQUICC II PCIe dma

David Laight David.Laight at ACULAB.COM
Tue Nov 2 02:58:37 EST 2010


I'm trying to get a ppc 831x to do PCIe dma transfers, PIO transfers
work ok but are somewhat lethargic (partially due to the slave).

I've done the following:
- All reads/writes (including the dma descriptors) are byteswapped.
- Enabled the dma in PEX_CSB_CTRL (value 0x3f)
- Used the kernel physical addresses for all addresses.
  For memory from virt_to_phys(), pci from pci_resource_start().
  (virt_to_phys() gives invalid values for the pci area).
- I'm setting both 'snoop' bits to 1 (as per the device errata)
  So the descriptor 'ctrl' has value (len >> 2) << 12 | 0xff9,
  and the dma 'ctrl' 0x401.
- I've put a 'sync' instruction (iosync()) just before the
  write to start the dma.

On the first request after hard reset, the dma status register
REX_RDMA_STAT gets set to 4. On subsequent requests it stays zero.
Nothing else appears to happen at all (except the 'start' bit
always reads back zero).
The 'CSB status register' at 0x81c stays zero - so I don't think
it is stuck waiting for the PCIe slave.

I'm not at all sure of the word ordering for the dma descriptor!
Page 14-113 doesn't say! However I've written the values so that
it doesn't matter - once I get a status written back I'll know...

I've probably forgotten something very silly!
Anyone who has got this working any ideas ??

	David




More information about the Linuxppc-dev mailing list