From: Stefan Roese <sr@denx.de>
To: benh@kernel.crashing.org
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] [POWERPC] 4xx: Add endpoint support to 4xx PCIe driver
Date: Thu, 10 Apr 2008 12:21:42 +0200 [thread overview]
Message-ID: <200804101221.43154.sr@denx.de> (raw)
In-Reply-To: <1207819649.6958.3.camel@pasglop>
On Thursday 10 April 2008, Benjamin Herrenschmidt wrote:
> On Wed, 2008-04-02 at 17:12 +0200, Stefan Roese wrote:
>
> ../..
>
> Overall looks good, just a few things:
Ben, thanks for the review.
> In general, while I have nothing against the idea of reading the HW
> setup left by uboot, I wonder if it wouldn't be best to have this file
> capable of fully configuring it in either mode based on DT properties
> instead.
Sure, this would be optimal. But frankly, I currently have no need for this
non U-Boot mode, and therefore I didn't implement it. This can be added later
when really needed don't you think?
> The PCI node in endpoint mode would be called something
> different, such as "pci-endpoint" and would contain some kind of
> "endpoint-mode" property, maybe ? That way people using other
> bootloaders or even booting of straight flash kernels can still use
> this.
Good. But again, I would really prefer to first include this U-Boot style
endpoint support and later add this independent device tree endpoint
configuration when really needed.
> > +
> > + out_le32(mbase + PCI_BASE_ADDRESS_0,
> > RES_TO_U32_LOW(res->start)); + out_le32(mbase +
> > PCI_BASE_ADDRESS_1, RES_TO_U32_HIGH(res->start)); + }
> >
> > /* Enable inbound mapping */
> > out_le32(mbase + PECFG_PIMEN, 0x1);
> >
> > - out_le32(mbase + PCI_BASE_ADDRESS_0, RES_TO_U32_LOW(res->start));
> > - out_le32(mbase + PCI_BASE_ADDRESS_1,
> > RES_TO_U32_HIGH(res->start)); -
>
> does it work properly to setup the BARs before enabling the inbound
> mapping ?
Yes. At least I have seen no problems so far.
> > * OMRs are already reset, also disable PIMs
> > @@ -1531,14 +1569,26 @@ static void __init
> > ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port) * and device
> > IDs into it. Those are the same bogus one that the * initial code in
> > arch/ppc add. We might want to change that. */
> > - out_le16(mbase + 0x200, 0xaaa0 + port->index);
> > - out_le16(mbase + 0x202, 0xbed0 + port->index);
> > + if (!port->endpoint) {
> > + out_le16(mbase + 0x200, 0xaaa0 + port->index);
> > + out_le16(mbase + 0x202, 0xbed0 + port->index);
>
> We should probably setup the config space IDs based on some device-tree
> properties no ?
Good idea. How about "vendor-id" and "device-id"? And we probably need some
for endpoint mode too now. "vendor-id-endpoint" and "device-id-endpoint"?
And how should we handle the backward compatibility? Should I set the old
values as default when those properties are not available?
Thanks.
Best regards,
Stefan
next prev parent reply other threads:[~2008-04-10 10:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 15:12 [PATCH] [POWERPC] 4xx: Add endpoint support to 4xx PCIe driver Stefan Roese
2008-04-02 15:16 ` Stefan Roese
2008-04-10 9:27 ` Benjamin Herrenschmidt
2008-04-10 10:21 ` Stefan Roese [this message]
2008-04-10 10:35 ` Benjamin Herrenschmidt
2008-04-10 11:59 ` Stefan Roese
2008-04-10 12:23 ` Benjamin Herrenschmidt
2008-04-10 13:37 ` Stefan Roese
2008-04-10 21:58 ` Benjamin Herrenschmidt
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=200804101221.43154.sr@denx.de \
--to=sr@denx.de \
--cc=benh@kernel.crashing.org \
--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 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.