[Top] [All Lists]

Linux mips and DMA

Subject: Linux mips and DMA
From: Jon Dufresne <>
Date: Wed, 09 Jan 2008 13:57:17 -0500
Original-recipient: rfc822;

I am in the process of porting a known working linux driver for a pci
device from an x86 machine to a mips machine. This is my first time
developing a driver under mips (but not the first time with x86) so I am
learning some of the differences and gotchas that exist when porting a
driver like this.

My most recent problem exists when setting up dma between the host and
the device. I am using the following two websites as guides for doing

In addition I am using LDD.

To create the dma memory area I am using the function
"pci_alloc_consistent". When I pass the "dma_handle" (as I understand it
the host's physical address of the dma memory), to the pci device, the
device in the x86 box correctly access this memory, not so in the mips

Not sure if this is helpful, but the fuction returns the following
addresses on the mips when I use it:

dma_handle=0x026f0000 size=0x00010000 cpu_addr=0xa26f0000

Does this physical address seem abnormally low? It is well outside the
range of the PCI BARs which exist around 0x20000000.

Anything I should know about using pci_alloc_consistent on a mips?

If you need more information to understand the situation I'd be happy to
supply it but right now I'm not sure what to supply.


<Prev in Thread] Current Thread [Next in Thread>