From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Zang Roy-r61911 <tie-fei.zang@freescale.com>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
Yang Xin-Xin-r48390 <Xin-Xin.Yang@freescale.com>,
Paul Mackerras <paulus@samba.org>,
Alexandre.Bounine@tundra.com
Subject: RE: [PATCH/2.6.17-rc4 1/10] Powerpc: Add general support for mpc7 448h pc2 (Taiga) platform
Date: Fri, 02 Jun 2006 18:19:50 +1000 [thread overview]
Message-ID: <1149236391.16202.70.camel@localhost.localdomain> (raw)
In-Reply-To: <9FCDBA58F226D911B202000BDBAD4673066CF6DF@zch01exm40.ap.freescale.net>
On Fri, 2006-06-02 at 16:05 +0800, Zang Roy-r61911 wrote:
> > > If I really need to use bat0 or bat1( I see that the
> > general mmu use
> > > bat2 and bat3, where should I set up them?
> > >
> > > For tsi108 pci configuration access, I need to map 16Mbyte physical
> > > address. If I do not use an extra bat, I can not get the correct
> > > virtual address use ioremap.
> >
> > What do you mean ? An ioremap will work, it will give you any
> > virtual address, you just have to store that in a global
> > instead of hard coding it. Hard coded virtual addresses are
> > bad. Especially for things like PCI config space that really
> > isn't performance sensitive.
> >
> > Ben.
> >
>
> I had hoped to get the pci configure base address by ioremap, but failed.
> the tsi108 register locates at 0xc000,0000 ~0xC001,0000. It is OK to
> access them by ioremap. While pci configure access need to ioremap
> 0xfb00,0000 ~0xfc00,0000.
> I traced my code, when I do ioremap, there is no bat match, I get the virtual
> address from ioremap_bot. the init ioremap_bot is 0xfe000000. When I do
> tsi108_csr_vir_base = ioremap(0xfb000000,0x1000000),
> the ioremap_bot is 0xfdffe000 ( I get the serial port ioremap steal some space),
> tsi108_csr_vir_base = 0xfdfee000, I can not access the configure space with this
> address.
What happens if you try ?
> While if I use bat0 or bat1 to map my tsi108 register space, the ioremap_bot will keep
> to 0xfe000000 until I do
> tsi108_csr_vir_base = ioremap(0xfb000000,0x1000000)
> then I get tsi108_csr_vir_base = 0xfd000000. Everything is OK.
Both should work fine
Ben.
next prev parent reply other threads:[~2006-06-02 8:20 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-02 8:05 [PATCH/2.6.17-rc4 1/10] Powerpc: Add general support for mpc7 448h pc2 (Taiga) platform Zang Roy-r61911
2006-06-02 8:19 ` Benjamin Herrenschmidt [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-06-02 8:33 Liu Dave-r63238
2006-06-02 8:20 Zang Roy-r61911
2006-06-02 14:50 ` Kumar Gala
2006-06-03 0:36 ` Benjamin Herrenschmidt
2006-06-02 7:40 Zang Roy-r61911
2006-06-02 7:38 Liu Dave-r63238
2006-06-02 8:17 ` Benjamin Herrenschmidt
2006-06-02 7:29 Zang Roy-r61911
2006-06-02 7:32 ` Benjamin Herrenschmidt
2006-05-26 6:49 Zang Roy-r61911
2006-05-26 7:34 ` Benjamin Herrenschmidt
2006-05-24 7:23 Zang Roy-r61911
2006-05-19 1:45 Zang Roy-r61911
2006-05-18 10:49 Zang Roy-r61911
2006-05-18 10:21 Zang Roy-r61911
2006-05-18 10:35 ` Benjamin Herrenschmidt
2006-05-18 10:39 ` Paul Mackerras
2006-05-18 14:06 ` Kumar Gala
2006-05-18 16:35 ` Kumar Gala
2006-05-18 8:05 Zang Roy-r61911
2006-05-18 16:36 ` Kumar Gala
2006-05-18 7:12 Zang Roy-r61911
2006-05-18 7:22 ` Benjamin Herrenschmidt
2006-05-18 16:41 ` Kumar Gala
2006-05-18 22:04 ` Benjamin Herrenschmidt
2006-05-18 20:49 ` Andy Fleming
2006-05-26 6:05 ` Benjamin Herrenschmidt
2006-05-18 6:57 Zang Roy-r61911
2006-05-18 7:19 ` Benjamin Herrenschmidt
2006-05-18 16:43 ` Kumar Gala
2006-05-18 6:46 Zang Roy-r61911
2006-05-18 6:59 ` Benjamin Herrenschmidt
2006-05-18 4:12 Zang Roy-r61911
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=1149236391.16202.70.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=Alexandre.Bounine@tundra.com \
--cc=Xin-Xin.Yang@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=tie-fei.zang@freescale.com \
/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).