publishing OF platform devices

Kim Phillips kim.phillips at freescale.com
Fri Mar 30 07:56:14 EST 2007


On Thu, 29 Mar 2007 23:26:39 +0200
Sylvain Munaut <tnt at 246tNt.com> wrote:

> John Rigby wrote:
> > I have a question about the "right" way to publish platform
> > devices via of_platform_bus_probe.
> >
> > On 5200 platforms it gets called from
> > mpc52xx_declare_of_platform_devices which is registered as the
> > machdep_calls init routine.
> >   
> It's called by machdep calls so that it's only called if the platform
> is detected ...
> > On other platforms it is called via a device_initcall
> >   
> That will always be called which is bad.
> 
> Because if you have a kernel will multiple platform support built in,
> it will
> be called everytime, even if it's not running on the good platform.
> > Also I noticed that some 83xx platforms don't call
> > of_platform_bus_probe at all.  Thats ok because most of those
> > devices are register various routines in fsl_soc.c.  The one I have
> > not figured out yet is spi, I don't see anyone registering
> > mpc83xx_spi?
> >   
> On theses I have no idea ...
> 
spi_mpc83xx is a platform_driver.  You either have to add spi code to
fsl_soc.c, or, probably better, make it an of_platform_driver (see
drivers/net/ucc_geth.c).  Hopefully an of_platform_driver patch will
be accepted now that cuimage is here, and 83xx can be removed from arch/ppc.

Kim



More information about the Linuxppc-dev mailing list