Devicetree
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Joe Shmo <spamreceptor@yahoo.com>
Cc: devicetree-discuss@lists.ozlabs.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: Help with SPI node
Date: Mon, 5 Oct 2009 08:30:44 -0600	[thread overview]
Message-ID: <fa686aa40910050730m6a98b156p7b1240b7560f1aab@mail.gmail.com> (raw)
In-Reply-To: <132676.44242.qm@web30102.mail.mud.yahoo.com>

On Thu, Oct 1, 2009 at 10:19 AM, Joe Shmo <spamreceptor@yahoo.com> wrote:
>
>  I'm attempting to get SPI to work on my embedded design
>  that is based on the mpc8313erbd reference board wiht a
>  2.6.27 kernel.  I cannot open the SPI device.
>  Tracing through the kernel code, it looks like the device is
>  not being found in the DTB file.  However there is a
>  SPI node in there already described.  Our boards is a
>  SPI master, and the device we will attach is a SPI
>  slave.  Could someone elaborate on what is needed in
>  the DTS file to have our SPI driver work and respond to an
>  open() call?

Some notes:
- you should also cc: the linuxppc-dev@lists.ozlabs.org when asking
questions about powerpc platforms.
- Please post in plain text only, not HTML.  Yahoo should have an
option for posting in plain text instead of formated.
- "Joe Shmo"?  It's not against the rules to use a pseudoname, but
it's not very polite.

Things to check:
- Once the system is booted, look in /sys/bus/of_platform/devices to
see if the SPI bus device is registered.  If it isn't there then it
means that the 8xxx platform code (arch/powerpc/platforms/) isn't
registering the device.
- Look in /sys/bus/of_platform/drivers/ to see if the mpc8xxx_spi
driver is loaded into the kernel.  If it isn't there, then you need to
load the driver into the kernel.
- If both are present, then look in
/sys/bus/of_platform/devices/e0007000.spi (I think; the name might be
slightly different) for a 'driver' symlink.  If the symlink is there,
then it means that the driver is bound to the device.  Most likely it
means that the "compatible" value in the node doesn't match what the
driver is looking for.

Look at those things and report back.

g.

--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  parent reply	other threads:[~2009-10-05 14:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01 16:19 Help with SPI node Joe Shmo
     [not found] ` <132676.44242.qm-bEaypHPvYmavuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2009-10-01 16:28   ` John Linn
     [not found]     ` <0784665f-ccdf-40b6-bd59-ea89687f56da-RaUQJvECHivmSZWoU+LsGrjjLBE8jN/0@public.gmane.org>
2009-10-02 14:48       ` Joe Shmo
2009-10-05 14:30 ` Grant Likely [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-25 15:17 Joe Shmo

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=fa686aa40910050730m6a98b156p7b1240b7560f1aab@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=spamreceptor@yahoo.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