linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* question about of_platform vs 'platform'
@ 2008-03-19 21:49 Mike Hench
  2008-03-19 22:43 ` Scott Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Hench @ 2008-03-19 21:49 UTC (permalink / raw)
  To: linuxppc-dev

Sorry if this is a stupid question
I am new to PPC.
I am trying to make the SPI work on a MPC8313erdb board.
It isn't loading.
To that end, I added a printk to drivers/base/dd.c __driver_match
function

dmesg |grep -i spi

bus: 'of_platform': driver_probe_device: matching device e0007000.spi
with drive
r fsl-elbc
bus: 'platform': driver_probe_device: matching device fsl-usb2-udc.0
with driver
 mpc83xx_spi
bus: 'platform': driver_probe_device: matching device mpc83xx_wdt.0 with
driver
mpc83xx_spi
bus: 'platform': driver_probe_device: matching device fsl-i2c.0 with
driver mpc8
3xx_spi
bus: 'platform': driver_probe_device: matching device fsl-i2c.1 with
driver mpc8
3xx_spi
bus: 'platform': driver_probe_device: matching device Fixed MDIO bus.0
with driv
er mpc83xx_spi

it seems there is some sort of mismatch
how did the kernel decide that SPI was an 'of_platform' device.
The driver just uses 'platform' sorts of calls.
As opposed to the mpc52xx driver which uses of_platform.
The DTS file spi entry look similar to the i2c entries.
Those are treated as 'platform' devices.

A nudge/shove in the right direction would be appreciated.

Thanks.
Mike

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: question about of_platform vs 'platform'
  2008-03-19 21:49 question about of_platform vs 'platform' Mike Hench
@ 2008-03-19 22:43 ` Scott Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Scott Wood @ 2008-03-19 22:43 UTC (permalink / raw)
  To: Mike Hench; +Cc: linuxppc-dev

On Wed, Mar 19, 2008 at 04:49:18PM -0500, Mike Hench wrote:
> bus: 'of_platform': driver_probe_device: matching device e0007000.spi
> with drive
> r fsl-elbc
> bus: 'platform': driver_probe_device: matching device fsl-usb2-udc.0
> with driver
>  mpc83xx_spi
> bus: 'platform': driver_probe_device: matching device mpc83xx_wdt.0 with
> driver
> mpc83xx_spi
> bus: 'platform': driver_probe_device: matching device fsl-i2c.0 with
> driver mpc8
> 3xx_spi
> bus: 'platform': driver_probe_device: matching device fsl-i2c.1 with
> driver mpc8
> 3xx_spi
> bus: 'platform': driver_probe_device: matching device Fixed MDIO bus.0
> with driv
> er mpc83xx_spi
> 
> it seems there is some sort of mismatch
> how did the kernel decide that SPI was an 'of_platform' device.

It will try to match all device nodes under probed buses to an of_platform
device.

> The DTS file spi entry look similar to the i2c entries.
> Those are treated as 'platform' devices.

There is glue code in arch/powerpc/sysdev/fsl_soc.c:of_fsl_spi_probe() to
create platform devices from the device nodes.

It doesn't seem to be registered as an initcall, though -- you need to call
it from platform code.  See mpc832x_rdb.c for an example.

-Scott

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-19 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 21:49 question about of_platform vs 'platform' Mike Hench
2008-03-19 22:43 ` Scott Wood

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).