linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Eddie Dawydiuk <eddie@embeddedarm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: PowerPC iotable_init equivalent?
Date: Fri, 17 Apr 2009 23:42:55 -0600	[thread overview]
Message-ID: <fa686aa40904172242w378fd4c8n1a4f68d897af2859@mail.gmail.com> (raw)
In-Reply-To: <49E8F2D7.3050603@embeddedarm.com>

On Fri, Apr 17, 2009 at 3:21 PM, Eddie Dawydiuk <eddie@embeddedarm.com> wrote:
> Hello,
>
> In the past I've worked with ARM architectures where I could setup virtual /
> physical address mappings so I don't have to ioremap then pass around
> pointers. Does PowerPC have an equivalent abstraction? If not whats the
> recommended approach?

No.  Predefining virt->phys mappings is fragile since it makes
assumptions about how the kernel is going to carve up the virtual
address space.  Better to let the kernel allocate virtual ranges as it
needs them.

As Kumar says, do your ioremap() (or, even better: of_iomap()) in your
driver's probe function and store it in the driver's private data
structure.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

      parent reply	other threads:[~2009-04-18  5:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 21:21 PowerPC iotable_init equivalent? Eddie Dawydiuk
2009-04-17 21:31 ` Roderick Colenbrander
2009-04-17 21:32 ` Kumar Gala
2009-04-18  5:42 ` Grant Likely [this message]

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=fa686aa40904172242w378fd4c8n1a4f68d897af2859@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=eddie@embeddedarm.com \
    --cc=linuxppc-dev@ozlabs.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).