All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Dennis.Yxun" <dennis.yxun@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Question: about Physical Address mapping
Date: Mon, 7 Dec 2009 13:10:34 +0000	[thread overview]
Message-ID: <20091207131034.GA5119@linux-mips.org> (raw)
In-Reply-To: <7b09df4c0912062339g418f432cr28d92c18ed273d2@mail.gmail.com>

On Mon, Dec 07, 2009 at 03:39:15PM +0800, Dennis.Yxun wrote:

> HI ALL:
>    I have a problem, that our MIPS hardware put registers location from
> 0x7000,0000 -0x7040,0000.
> So, I need to init TLB to access those registers.
>    My question is: can I map those range to Kseg2 (mapped,uncached)? I found
> "add_wired_entry" sit in
> kernel code, seems I should use this function.
> 
>    I found code in arch/mips/jazz/irq.c, and the comment tells me
> /* Map 0xe4000000 -> 0x0:600005C0, 0xe4100000 -> 400005C0 */
>    add_wired_entry(0x01800017, 0x01000017, 0xe4000000, PM_4M);
> 
> does that mean after add_wired_entry, virtual address 0xe400,0000 map to
> physical address 0x600005C0?
> why the address is 0x6000,05C0, not 0x6000,0000

I probably knew 15 years ago when I wrote this code :)

add_wired_entry() is a very awkard API and its use in the Jazz code is
broken so I suggest you use ioremap() instead.

  Ralf

  reply	other threads:[~2009-12-07 13:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07  7:39 Question: about Physical Address mapping Dennis.Yxun
2009-12-07 13:10 ` Ralf Baechle [this message]
2009-12-09  1:58   ` Dennis.Yxun

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=20091207131034.GA5119@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=dennis.yxun@gmail.com \
    --cc=linux-mips@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.