[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <412C8208B4A0464FA894C5F0C278CD5D01A209F4@039-SN1MPN1-002.039d.mgd.msft.net>
Date: Tue, 10 Jul 2012 02:29:31 +0000
From: Jia Hongtao-B38951 <B38951@...escale.com>
To: Rob Herring <robherring2@...il.com>,
Li Yang-R58472 <r58472@...escale.com>
CC: Greg KH <greg@...ah.com>,
"devicetree-discuss@...ts.ozlabs.org"
<devicetree-discuss@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V3 5/6] Avoid duplicate probe for of platform devices
> -----Original Message-----
> From: Rob Herring [mailto:robherring2@...il.com]
> Sent: Monday, July 09, 2012 9:58 PM
> To: Li Yang-R58472
> Cc: Jia Hongtao-B38951; Greg KH; devicetree-discuss@...ts.ozlabs.org;
> linux-kernel@...r.kernel.org
> Subject: Re: [PATCH V3 5/6] Avoid duplicate probe for of platform devices
>
> On 07/08/2012 10:46 PM, Li Yang-R58472 wrote:
> >>> I don't understand, why is this just showing up now? What
> >>> changed to cause this? Couldn't that be the real problem here?
> >>>
> >>
> >> The issue is showing up because we now probe devices twice.
> >> Previously, we just probe devices once. But now we changed the way
> >> of pci init which makes pci controllers should be probed earlier
> >> than other devices. So we have to probe pci nodes separately. Probe
> >> more than once is the root cause of this issue.
> >>
> >> The pci patchset I mentioned please refer to:
> >> http://patchwork.ozlabs.org/patch/163742/
> >
> > Let me try to clarify a little bit. The of platform bus normally
> > traverse the device tree to add all the devices. The change which
> > caused problem is that we need to probe PCIe RC devices at a earlier
> > stage of initialization. So we added these PCIe RC devices earlier
> > than the normal device tree traversal process. These PCIe RC devices
> > will be scanned again during the normal traversal and cause
> > duplicated devices being added. Our proposal is to deal with
> > duplicated devices automatically and make it possible to scan the
> > device tree multiple times for devices to be added.
>
> What is making PCI need to be probed earlier? Perhaps deferred probe
> would work?
Pci initialization fsl_add_bridge() should be called earlier as they used
to be called in board specific code xx_setup_arch(). Now we put this init
part in the probe function of pci controller to make the code infrastructure
better. That make pci bus should be probed earlier.
>
> Perhaps giving of_platform_populate an exclude list of compatible
> strings to skip would work.
>
> Rob
Yes, this would work and we actually already implemented this solution.
But I think it looks hackish and will influence the other API users.
Thanks.
-Jia Hongtao.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists