Subject: Re: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

From: Scott Wood <[email-masked]>
Date: Tue, 21 Aug 2012 13:33:44 -0500

On 08/20/2012 10:26 PM, Jia Hongtao-B38951 wrote:
> 
> 
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Tuesday, August 21, 2012 6:04 AM
>> To: Jia Hongtao-B38951
>> Cc: [email-masked]; [email-masked]; Li Yang-
>> R58472; Bradley Hughes
>> Subject: Re: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization
>> code
>>
>> Another interesting case is stxssa8555.dts, which has an i8259 node but
>> no ISA node (are there any other instances of this?).  However, I can't
>> tell if stx_gp3.c is the platform file that goes with this device tree,
>> or if the platform code for stxssa8555 is out-of-tree (or some other file
>> that I'm not seeing).
> 
> MPC8541_CDS and MPC8555_CDS also has i8259 but no ISA node. stx_gp3 seems go
> with stxssa8555.dts but I'm not sure ether.
> 
> So you mean we have to look for i8259 too for determining primary.
> Take device tree as evidence we can tell that real primary ether has isa node
> or i8259 node. And if there is no isa we just arbitrarily designate one.
> 
> If this logic works well then ok.

Yes, but it should be board code that does this, as it's a workaround
for a broken device tree.

Maybe have a common helper function that finds a toplevel PCI bus that
contains a node matching a supplied of_match.  This could be used for
both the ISA lookup and the i8259 lookup, and any other weird thing some
board might have as long as it can be uniquely represented with of_match.

-Scott