[PATCH] Add of_platform_device_scan().
Scott Wood
scottwood at freescale.com
Thu Oct 5 02:32:20 EST 2006
Arnd Bergmann wrote:
> I think it would be much more helpful to have working probing of all
> SOC buses during bootup.
I agree; I avoided doing that for now because I was uneasy about
duplicating device nodes for SOC devices covered under the non-OF
platform bus via code in sysdev/fsl_soc.c. It probably won't cause any
real problems unless a single device matches drivers on both buses (in
which case the of_device driver would probably be calling
of_platform_device_scan() anyway), but still...
What I'd really like (long-term, of course) is if platform_device and
of_device were merged, with device tree support (or at least a means of
passing on properties that *could* come from a device tree without
special glue code that knows about each property) in arch-neutral code;
the mechanism for discovering devices ideally shouldn't depend on the
CPU's instruction set.
> + for (child = NULL; (child = of_get_next_child(root, child)); ) {
> + if (strcmp(child->type, "spider") == 0) {
> + ret = of_soc_device_create(child, NULL);
> + if (ret)
> + goto out3;
> + }
> + }
Why only spider?
-Scott
More information about the Linuxppc-dev
mailing list