From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Liu Dave <DaveLiu@freescale.com>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
Huang Changming-R66093 <Chang-Ming.Huang@freescale.com>
Subject: Re: [PATCH v2 3/4] powerpc/fsl_pci: Add MPC83xx PCI-E controller RCmode support
Date: Mon, 5 Jan 2009 19:30:29 +0300 [thread overview]
Message-ID: <20090105163029.GA7345@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <D7CCA83BB0796C49BC0BB53B6AB1208904074B@zch01exm21.fsl.freescale.net>
On Mon, Jan 05, 2009 at 04:18:26PM +0800, Liu Dave wrote:
> > +static void __iomem *mpc83xx_pcie_remap_cfg(struct pci_bus *bus,
> > + unsigned int devfn, int offset)
> > +{
> > + struct pci_controller *hose = bus->sysdata;
> > + struct mpc83xx_pcie *pcie = hose->dn->data;
> > + u8 bus_no = bus->number - hose->first_busno;
> > + u32 dev_base = bus_no << 20 | devfn << 12;
>
> Hello Anton,
>
> There is one bug for the bus/device number shift according to the latest
> 83xx UM. The shift should be
>
> dev_base = (bus_no << 24) | (devfn << 16);
>
> You can download the latest MPC8315 UM as reference from
> http://www.freescale.com.
Ah! Thanks a lot, that explains a lot.
I was quite puzzled why FSL u-boots are using "wrong" shifts, so I
"corrected" them. And indeed, I was looking at the old reference
manual: MPC8315ERM Rev. 0 09/2007. The new manual (MPC8315ERM
Rev. 1 2/2008) specifies other bits, the same as used in the FSL
U-Boot, i.e. 31:24 for bus no, 23:19 and 18:16 for device and func.
> AFAIK, you will work on the u-boot for 83xx PEX, Any question forward
> to Jerry Huang (in cc). I think he should have some update for PEX.
Much thanks for the information,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
prev parent reply other threads:[~2009-01-05 16:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-29 16:40 [PATCH 3/4] powerpc/fsl_pci: Add MPC83xx PCI-E controller RC mode support Anton Vorontsov
2008-12-29 18:09 ` Kumar Gala
2008-12-29 21:05 ` [PATCH v2 " Anton Vorontsov
2008-12-30 18:07 ` Kumar Gala
2008-12-30 20:18 ` [PATCH v3 " Anton Vorontsov
2009-01-05 8:18 ` [PATCH v2 3/4] powerpc/fsl_pci: Add MPC83xx PCI-E controller RCmode support Liu Dave
2009-01-05 8:41 ` Arun Kumar
2009-01-05 16:30 ` Anton Vorontsov [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=20090105163029.GA7345@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=Chang-Ming.Huang@freescale.com \
--cc=DaveLiu@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).