linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Mike Hench <mhench@engagenet.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: question about of_platform vs 'platform'
Date: Wed, 19 Mar 2008 17:43:45 -0500	[thread overview]
Message-ID: <20080319224345.GA5166@loki.buserror.net> (raw)
In-Reply-To: <6629C06B144F5C4098DFF95C4FF9DAF702BA1D37@mailsrv.engagenet.com>

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

      reply	other threads:[~2008-03-19 22:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 21:49 question about of_platform vs 'platform' Mike Hench
2008-03-19 22:43 ` Scott Wood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080319224345.GA5166@loki.buserror.net \
    --to=scottwood@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mhench@engagenet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).