[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250102-mpc83xx-v1-14-86f78ba2a7af@posteo.net>
Date: Thu, 02 Jan 2025 19:31:55 +0100
From: J. Neuschäfer via B4 Relay <devnull+j.ne.posteo.net@...nel.org>
To: Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Naveen N Rao <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Frank Li <Frank.Li@....com>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-gpio@...r.kernel.org,
J. Neuschäfer <j.ne@...teo.net>
Subject: [PATCH 14/19] powerpc: mpc83xx: Switch to of_platform_populate
From: "J. Neuschäfer" <j.ne@...teo.net>
Quoting from drivers/of/platform.c:
> of_platform_populate() - [...]
> Similar to of_platform_bus_probe(), this function walks the device
> tree and creates devices from nodes. It differs in that it follows
> the modern convention of requiring all device nodes to have a
> 'compatible' property, and it is suitable for creating devices which
> are children of the root node (of_platform_bus_probe will only create
> children of the root which are selected by the @matches argument).
This is useful for new board ports because it means that the C code does
not have to anticipate every node that is placed directly under the root.
As a consequence, the of_bus_ids list can be much shorter, and I've
trimmed it to the necessary parts:
- device-type = "soc" and compatible = "simple-bus" for the SoC bus
- compatible = "gianfar" for the Ethernet controller (TSEC), which
may contain an MDIO bus, which needs to be probed, as a subnode
Signed-off-by: J. Neuschäfer <j.ne@...teo.net>
---
arch/powerpc/platforms/83xx/misc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
index 1135c1ab923cc120f377a0d98767fef686cad1fe..bf522ee007bbb1429233355f668fc8563d8ca4e2 100644
--- a/arch/powerpc/platforms/83xx/misc.c
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -94,18 +94,14 @@ void __init mpc83xx_ipic_init_IRQ(void)
static const struct of_device_id of_bus_ids[] __initconst = {
{ .type = "soc", },
- { .compatible = "soc", },
{ .compatible = "simple-bus" },
{ .compatible = "gianfar" },
- { .compatible = "gpio-leds", },
- { .type = "qe", },
- { .compatible = "fsl,qe", },
{},
};
int __init mpc83xx_declare_of_platform_devices(void)
{
- of_platform_bus_probe(NULL, of_bus_ids, NULL);
+ of_platform_populate(NULL, of_bus_ids, NULL, NULL);
return 0;
}
--
2.45.2
Powered by blists - more mailing lists