linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: ashish anand <ashisha@india.infogain.com>
To: Goddeeris Frederic <Frederic.Goddeeris@siemens.atea.be>,
	linuxppc-embedded@lists.linuxppc.org
Subject: Re: "Kernel logical address"  vs "Physical"
Date: Fri, 14 Sep 2001 10:20:04 +0530	[thread overview]
Message-ID: <3BA18C7C.F2D4B343@india.infogain.com> (raw)
In-Reply-To: 6B546A602AD2D211BFF00008C7A42889041D6BDE@hrtades2.atea.be


> I have been working on a PPC platform, running Linux 2.2. This platform has
> a register where you can enable different options and where you can control
> several LED's. The vendor mentions that this register is mapped in memory at
> FA400000.
>
> When I write (in a driver)
>
> char *p=0xFA40000;
>
> *p = ..; (I know I should use writeb to be more portable.)
>
> it seems to work; the leds can be manipulated. But as FA400000 is a physical
> address, I thought that it had to be *p=__va(0xFA40000);
>
> Who can help me out? Where do I find a nice document about this?

actually when you refer to adress mentioned 0xFA400000 in driver this address is already virtual adress hence no need to  use __va macro.
this address was originally a physical adress and unaccessible from device untill earlier in code
a call for ioremap would have taken place.
after ioremapping it is a virtual address and can be used nicely in a driver.
transaction for this address would be valid as processor has now a entry for it and would be decoded by host bridge and forwarded to LED.
without ioremapping if you use you will get a kernel panic.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-09-14  4:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-14  8:44 "Kernel logical address" vs "Physical" Goddeeris Frederic
2001-09-14  4:50 ` ashish anand [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-14 10:52 Goddeeris Frederic
2001-09-14  6:06 ` ashish anand
2001-09-14 11:47 Goddeeris Frederic
2001-09-14  6:49 ` ashish anand
2001-09-14 18:26 ` Dan Malek
2001-09-14 12:13 Goddeeris Frederic

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=3BA18C7C.F2D4B343@india.infogain.com \
    --to=ashisha@india.infogain.com \
    --cc=Frederic.Goddeeris@siemens.atea.be \
    --cc=linuxppc-embedded@lists.linuxppc.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).