From: Ralf Baechle <ralf@linux-mips.org>
To: figo zhang <figo1802@gmail.com>
Cc: David Daney <ddaney@caviumnetworks.com>,
macro@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: Dma addr should use Kuseg1 for MIPS32?
Date: Mon, 7 Dec 2009 13:45:02 +0000 [thread overview]
Message-ID: <20091207134502.GB5119@linux-mips.org> (raw)
In-Reply-To: <c6ed1ac50912070455n736af31fuf2c981fc182b494f@mail.gmail.com>
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
next prev parent reply other threads:[~2009-12-07 13:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 12:55 Dma addr should use Kuseg1 for MIPS32? figo zhang
2009-12-07 13:45 ` Ralf Baechle [this message]
2009-12-08 1:49 ` figo zhang
2009-12-08 11:36 ` Sergei Shtylyov
2009-12-09 11:46 ` figo zhang
2009-12-09 11:47 ` figo zhang
[not found] <c6ed1ac50912062352u227c28e1me2107dbf7bd8a0ea@mail.gmail.com>
2009-12-07 13:30 ` zhangfx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091207134502.GB5119@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=ddaney@caviumnetworks.com \
--cc=figo1802@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.