linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: figo zhang <figo1802@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	David Daney <ddaney@caviumnetworks.com>,
	macro@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: Dma addr should use Kuseg1 for MIPS32?
Date: Tue, 08 Dec 2009 14:36:58 +0300	[thread overview]
Message-ID: <4B1E3A5A.9050100@ru.mvista.com> (raw)
In-Reply-To: <c6ed1ac50912071749m49b1e5f5m7ae53384389338d9@mail.gmail.com>

Hello.

figo zhang wrote:

>
>     > 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.
>
>
> in my puzzle, if i run 
> dma_vaddr =(char*) __get_free_pages(GFP_KERNEL,  order);
> dma_phy = virt_to_phy(dma_vaddr);
>
> if the result is:
> dma_vaddr = 0x801b00000;
> dma_phy = 0x1b00000;
>
> so i should write 0x1b00000 to my DMA Base register or wirte 
> (0x1b000000 | 0xa0000000) to DMA?

   You must always use the physical addresses when programming DMA, i.e. 
0x1b00000 in this case.

WBR, Sergei

  reply	other threads:[~2009-12-08 11:37 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
2009-12-08  1:49   ` figo zhang
2009-12-08 11:36     ` Sergei Shtylyov [this message]
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=4B1E3A5A.9050100@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=figo1802@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=ralf@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).