[Top] [All Lists]

Re: Dma addr should use Kuseg1 for MIPS32?

To: figo zhang <>
Subject: Re: Dma addr should use Kuseg1 for MIPS32?
From: Ralf Baechle <>
Date: Mon, 7 Dec 2009 13:45:02 +0000
Cc: David Daney <>,,
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.5.20 (2009-08-17)
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.


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