From: Kevin Hao <haokexin@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: Re: [PATCH] powerpc: populate the default bus with machine_arch_initcall
Date: Fri, 12 Aug 2016 10:32:55 +0800 [thread overview]
Message-ID: <20160812023254.GI17275@pek-khao-d1> (raw)
In-Reply-To: <CAL_JsqKSQ2pUNEm+1_skkOM=gYihYBztcJusnZ=PCOvo+TkV6A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4073 bytes --]
On Thu, Aug 11, 2016 at 08:17:52AM -0500, Rob Herring wrote:
> On Thu, Aug 11, 2016 at 6:09 AM, Kevin Hao <haokexin@gmail.com> wrote:
> > With the commit 44a7185c2ae6 ("of/platform: Add common method to
> > populate default bus"), a default function is introduced to populate
> > the default bus and this function is invoked at the arch_initcall_sync
> > level. This will override the arch specific population of default bus
> > which run at a lower level than arch_initcall_sync. Since not all
> > powerpc specific buses are added to the of_default_bus_match_table[],
> > this causes some powerpc specific bus are not probed. Fix this by
> > using a more preceding initcall.
> >
> > Signed-off-by: Kevin Hao <haokexin@gmail.com>
> > ---
> > Of course we can adjust the powerpc arch codes to use the
> > of_platform_default_populate_init(), but it has high risk to break
> > other boards given the complicated powerpc specific buses. So I would
> > like just to fix the broken boards in the current release, and cook
> > a patch to change to of_platform_default_populate_init() for linux-next.
>
> The patch that broke things was sitting in -next for some time and no
> one reported anything. Are all these boards broken?
At least in theory. :-)
The effect may be different due to what devices are missed. For me, the
Gianfar Ethernet on my mpc8315erdb board is malfunction due to the MIDIO bus
is not probed.
>
> I'm fine to just disable the default call for PPC instead if there's
> some chance this does not fix some boards.
I have tried to cover all the invocation of of_platform_bus_probe() via
machine_device_initcall(). Yes, I maybe missed some boards. But won't
we want to take this as a step to use the default populate function since
it does remove some reduplication codes?
> There could be some other
> initcall ordering dependencies.
>
> >
> > Only boot test on a mpc8315erdb board.
>
> Curious, what would it take to remove the of_platform_bus_probe and
> use the default here? We can add additional bus compatibles to match.
I thought about this. But the bus compatibles list seems a bit longer and
it may cause some side effects on some boards due to all these additional
buses. So that changes seem a bit aggressive to me. It does seem a feature
for linux-next. The following is the compatible buses list which are needed
to be added to the default match table if we want fix all the current broken
boards:
{ .compatible = "fsl,ep8248e-bcsr", },
{ .compatible = "fsl,pq2pro-localbus", },
{ .compatible = "fsl,qe", },
{ .compatible = "fsl,srio", },
{ .compatible = "gianfar", },
{ .compatible = "gpio-leds", },
{ .compatible = "hawk-bridge", },
{ .compatible = "ibm,ebc", },
{ .compatible = "ibm,opb", },
{ .compatible = "ibm,plb3", },
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,plb6", },
{ .compatible = "nintendo,flipper", },
{ .compatible = "nintendo,hollywood", },
{ .compatible = "pasemi,localbus", },
{ .compatible = "pasemi,sdc", },
{ .compatible = "soc", },
{ .compatible = "xlnx,compound", },
{ .compatible = "xlnx,dcr-v29-1.00.a", },
{ .compatible = "xlnx,opb-v20-1.10.c", },
{ .compatible = "xlnx,plb-v34-1.01.a", },
{ .compatible = "xlnx,plb-v34-1.02.a", },
{ .compatible = "xlnx,plb-v46-1.00.a", },
{ .compatible = "xlnx,plb-v46-1.02.a", },
{ .name = "cpm", },
{ .name = "localbus", },
{ .name = "soc", },
{ .type = "axon", },
{ .type = "ebc", },
{ .type = "opb", },
{ .type = "plb4", },
{ .type = "plb5", },
{ .type = "qe", },
{ .type = "soc", },
{ .type = "spider", },
Of course I can choose to use the default function if all you guys think it is
better. :-)
> The difference between of_platform_bus_probe and
> of_platform_bus_populate is the former will match root nodes with no
> compatible string. Most platforms should not need that behavior and it
> would be nice to know which ones.
I don't think this difference would cause any real side effect for these boards.
Thanks,
Kevin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-08-12 2:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 11:09 [PATCH] powerpc: populate the default bus with machine_arch_initcall Kevin Hao
2016-08-11 13:17 ` Rob Herring
2016-08-12 2:32 ` Kevin Hao [this message]
2016-08-12 4:39 ` Michael Ellerman
2016-08-12 5:49 ` Kevin Hao
2016-08-12 19:30 ` Rob Herring
2016-08-14 21:21 ` Benjamin Herrenschmidt
2016-08-14 22:42 ` Rob Herring
2016-08-14 23:54 ` 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=20160812023254.GI17275@pek-khao-d1 \
--to=haokexin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=robh@kernel.org \
--cc=wangkefeng.wang@huawei.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).