linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: John Rigby <jrigby@freescale.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Scott Wood <scottwood@freescale.com>,
	linuxppc-dev@ozlabs.org, Kumar Gala <kumar.gala@freescale.com>
Subject: Re: [PATCH 5121 pci 1/3] powerpc: 83xx: pci: Remove need for get_immrbase from mpc83xx_add_bridge.
Date: Wed, 13 Aug 2008 10:30:37 -0600	[thread overview]
Message-ID: <48A30C2D.1070106@freescale.com> (raw)
In-Reply-To: <fa686aa40808130923q2ef7d4b7ha5a9225ce0afd061@mail.gmail.com>

Grant Likely wrote:
> On Wed, Aug 13, 2008 at 10:06 AM, John Rigby <jrigby@freescale.com> wrote:
>   
>>> On Thu, Aug 07, 2008 at 11:36:25AM -0600, John Rigby wrote:
>>> Can you use something like 'fsl,primary-pci-bridge' instead?  'primary'
>>> is a little too generic for my taste.  Also, the purpose of identifying
>>> one of the PCI bridges as primary should be documented (This is me
>>> pushing against encoding Linux internal implementation details into the
>>> device tree, I suspect that 'primary' doesn't belong in the device tree
>>> at all).
>>>
>>>       
>> Ok, I got the primary idea from sam440ep.dts, I'm willing to do something
>> different.
>>
>> I have thought about adding an is_primary argument to mpc83xx_add_bridge
>> like fsl_add_bridge has and make the callers figure out which is primary.
>>
>> The simple case is the platform that have only one bus:
>>   for_each_compatible_node(np, "pci", "fsl,mpc8540-pci")
>>       fsl_add_bridge(np, 1);
>>
>> Callers with multiple bridges do something like this:
>>   for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") {
>>       struct resource rsrc;
>>       of_address_to_resource(np, 0, &rsrc);
>>       if ((rsrc.start & 0xfffff) == 0x8000)
>>           fsl_add_bridge(np, 1);
>>       else
>>           fsl_add_bridge(np, 0);
>>   }
>>
>> So now we are using hardcoded offsets again.
>>     
>
> Go with the hardcoded offset.  Linux is broken, so the workaround
> should be in Linux code until Linux PCI code is fixed.
>
> g.
>
>   
Ok, I'll leave the offset checking in mpc83xx_add_bridge rather than 
having it duplicated in the eight different callers.

      reply	other threads:[~2008-08-13 16:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 17:36 [PATCH 5121 pci 1/3] powerpc: 83xx: pci: Remove need for get_immrbase from mpc83xx_add_bridge John Rigby
2008-08-07 17:36 ` [PATCH 5121 pci 2/3] powerpc: 5121: Add PCI support John Rigby
2008-08-07 17:36   ` [PATCH 5121 pci 3/3] powerpc: pci: 5121: Hide pci bridge John Rigby
2008-08-13  5:16     ` Grant Likely
2008-08-14  3:19       ` Kumar Gala
2008-08-13  5:12   ` [PATCH 5121 pci 2/3] powerpc: 5121: Add PCI support Grant Likely
2008-08-13  5:09 ` [PATCH 5121 pci 1/3] powerpc: 83xx: pci: Remove need for get_immrbase from mpc83xx_add_bridge Grant Likely
2008-08-13 16:06   ` John Rigby
2008-08-13 16:10     ` Scott Wood
2008-08-13 16:20       ` Grant Likely
2008-08-13 16:23     ` Grant Likely
2008-08-13 16:30       ` John Rigby [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=48A30C2D.1070106@freescale.com \
    --to=jrigby@freescale.com \
    --cc=grant.likely@secretlab.ca \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@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).