Re: Dma addr should use Kuseg1 for MIPS32?

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

 



On Mon, Dec 07, 2009 at 08:55:12PM +0800, figo zhang wrote:

> I am writing a driver for MIPS32. i wirte this code for DMA addr:
> 
> dma_vaddr =(char*) __get_free_pages(GFP_KERNEL|
> GFP_DMA, order);

You probably don't want to use GFP_DMA - unless your hardware has DMA
restrictions such as the ISA's bus's 16MB limit.

> dma_phy = virt_to_phy(dma_vaddr);

Ouch.  Don't.  See Documentation/DMA-API.txt for how to do it.

> i write dma_phy to DMA base register, but why it cannot work? it should
> write Kseg1 space to DMA register?
> I remember that it is ok for ARM/X86 .

It's only happens to work on some systems.

  Ralf


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

  Powered by Linux