Subject: Re: [PATCH] powerpc/p5040ds: Add support for P5040DS board

From: Scott Wood <[email-masked]>
Date: Tue, 24 Jul 2012 16:31:57 -0500

On 07/24/2012 04:19 PM, Timur Tabi wrote:
> Scott Wood wrote:
>>>> +	compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.2";
>> p5040 has PCIe v2.4.
>>
>> Note that there is a version register, so perhaps we should drop the
>> version number from the compatible (and mention the version register in
>> the binding).
>>
>> Might want to double check the other version numbers in this file too.
> 
> It appears that this compatible string is used by U-Boot to find the nodes
> for fixups:

SDK U-Boot, I assume you mean.

> #elif defined(CONFIG_PPC_P5040)
> #define CONFIG_MAX_CPUS			4
> ...
> #define CONFIG_SYS_FSL_PCIE_COMPAT	"fsl,qoriq-pcie-v2.2"
> 
> Which means that I can't just change it from v2.2 to v2.4 without breaking
> U-Boot.  Ugh.

Another reason for dropping the version from this particular compatible.
 Wouldn't stop this breakage, but would make future ones less likely.

And of course why we should carefully verify the information in the
device trees before we go copying and pasting in the first place.

Though, it depends on whether we determine that v2.4 is 100% backwards
compatible with v2.2, in which case we could list both.  It looks like
the v2.3 chips list both, and U-Boot refers to v2.2.  One possible point
of contention on compatibility is the change in where LIODN is specified
(moved from guts to the PCIe registers), especially if we're claiming
backwards comaptibility on the guts side as well.

> How do you know that the P5040 has v2.4?

See PEX_IP_BLK_REV1.

One new thing in v2.4 is the LIODN permission table, rather than one
LIODN for the entire root complex.

-Scott