Linux mips and DMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

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
this:

https://lwn.net/Articles/28230/
https://lwn.net/Articles/28092/

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
box.

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.

Thanks,
Jon




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux