linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tnt.com>
To: ppc linux embedded <linuxppc-embedded@lists.linuxppc.org>
Subject: Getting rid of static IO mapping
Date: Tue, 06 Jul 2004 23:39:52 +0200	[thread overview]
Message-ID: <40EB1C28.3000402@246tNt.com> (raw)


Hi,

In the mpc5200 2.6 support, I'm trying to get rid of all static io
mapping.
So every address I use must be ioremaped. For the device drivers, no
problem they are remaped during probe and released if modules get
unloaded. For some routines used at boot & setup, I just ioremap at
the function begining and ioumap at the end. For interrupt handling,
since ioremap at each interrupt is not really nice, I just do it
durint irq_init and then keep the vaddr in a global var to the file
(static).

Until there, it works fine. My only problem left is with the
ppc_md.progress. I'm not sure what is the memory environment at each
time it might be called. Can I use ioremap/iounmap at each call ? (I
know I could just try but that might work even if it's wrong(tm) ).

In the current situation, I use the physical address and there is a
1:1 mapping. The mapping is first done by directly manipulating
{D,I}BAT2, then by setup_io_mappings.
If I understood correctly, I should use the physical address while the
BAT2 mapping is still active, then when the memory managment is ok,
ioremap it. Is it correct ? How can I know when BAT2 has been
overwritten and ioremap ready to go ? Is this the purpose of
mem_init_done ?


Sylvain Munaut


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

             reply	other threads:[~2004-07-06 21:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-06 21:39 Sylvain Munaut [this message]
2004-07-06 22:33 ` Getting rid of static IO mapping Sylvain Munaut
2004-07-07  3:58   ` Linh Dang
2004-07-07  8:40     ` Sylvain Munaut
2004-07-07 17:07 ` Sylvain Munaut
2004-07-07 20:49   ` Dan Malek
2004-07-07 22:45     ` Sylvain Munaut
2004-07-07 23:41   ` Linh Dang

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=40EB1C28.3000402@246tNt.com \
    --to=tnt@246tnt.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 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).