[PATCH] Add of_platform_device_scan().

Arnd Bergmann arnd at arndb.de
Thu Oct 5 02:37:46 EST 2006


On Wednesday 04 October 2006 18:32, Scott Wood wrote:
> 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.

My guess is that this won't happen, because other architectures
normally don't describe their platform devices in a way that is
anywhere near what we have on powerpc.

Benh suggested moving some of the functionality of of_platform_device
into the common of_device so we don't really have to use an
of_platform_device for stuff that can be automatically probed.

I guess we'll see a patch from him soon.

> > +     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?

Mistake on my side. That's what I have in my experimental device tree.
It should be more generic.

	Arnd <><



More information about the Linuxppc-dev mailing list