All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: shaowei dai <dshaowei@rfnetech.com>
Cc: Sangmoon Kim <dogoil@etinsys.com>, linuxppc-embedded@lists.linuxppc.org
Subject: Re: map iomem in linux_2_4_dev
Date: Tue, 28 May 2002 10:36:04 +1000	[thread overview]
Message-ID: <20020528003604.GN16537@zax> (raw)
In-Reply-To: <008501c20556$544612c0$e1a8459b@ntu.edu.sg>


On Mon, May 27, 2002 at 04:13:05PM +0800, shaowei dai wrote:
>
> Hi, Sangmoon:
>
> Thanks. I got it. We've to use io_block_mapping() followed by ioremap() to
> map the physical address.

No, that's rubbish.  Use one or the other. ioremap() takes a physical
address and returns the virtual address at which it mapped it.

> From: "Sangmoon Kim" <dogoil@etinsys.com>
> To: "shaowei dai" <dshaowei@rfnetech.com>;
> <linuxppc-embedded@lists.linuxppc.org>
> Sent: Monday, May 27, 2002 4:13 PM
> Subject: Re: map iomem in linux_2_4_dev
>
>
> > Hi, Shaowei:
> >
> > The parameter addr of ioremap is not a virtual address
> > but a kind of physical address.
> >
> > Let us have a device at 0x78000000.
> > We can change the address to 0xf0000000 by...
> >  io_block_mapping(0xf0000000, 0x78000000, 0x08000000, _PAGE_IO);
> > Than what is the return value of ioremap(0x78000000, 0x08000000)?
> > That is 0xf0000000.
> >
> > The system changes the addresses of devices for various reason.
> > We only know the original address.
> > Than we can use the ioremap to get the changed address.
> >
> > -Sangmoon Kim-

--
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.  -- H.L. Mencken
http://www.ozlabs.org/people/dgibson

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

  reply	other threads:[~2002-05-28  0:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-27  5:59 map iomem in linux_2_4_dev shaowei dai
2002-05-27  6:34 ` David Gibson
2002-05-27  6:51   ` shaowei dai
2002-05-27  8:13     ` Sangmoon Kim
2002-05-27  8:13       ` shaowei dai
2002-05-28  0:36         ` David Gibson [this message]
2002-05-28  4:42           ` Sangmoon Kim
  -- strict thread matches above, loose matches on Subject: below --
2002-05-28 10:38 Sangmoon Kim
2002-05-28 13:23 ` Matt Porter
2002-05-29  4:57   ` Sangmoon Kim
2002-05-29  5:47     ` Roland Dreier
2002-05-29  6:01       ` Sangmoon Kim
2002-05-29  5:47     ` David Gibson
2002-05-29  6:14       ` Sangmoon Kim
2002-05-29 12:48       ` shaowei dai

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=20020528003604.GN16537@zax \
    --to=david@gibson.dropbear.id.au \
    --cc=dogoil@etinsys.com \
    --cc=dshaowei@rfnetech.com \
    --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 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.