All of lore.kernel.org
 help / color / mirror / Atom feed
From: jakob@viketoft.se (Jakob Viketoft)
To: linux-arm-kernel@lists.infradead.org
Subject: SPI trouble on Colibri 270 (PXA)...
Date: Tue, 20 Apr 2010 17:20:37 +0200	[thread overview]
Message-ID: <4BCDC645.5090001@viketoft.se> (raw)
In-Reply-To: <q2sf17812d71004200614n58fb6cabgd0686d3ab6788b23@mail.gmail.com>

Eric Miao wrote:
> On Tue, Apr 20, 2010 at 7:58 PM, Jakob Viketoft <jakob@viketoft.se> wrote:
<...>
>> I haven't seen any other board using the same combination (the m25p80 and
>> the pxa2xx), but I'm still opting for an error on my part somewhere. I've
>> attached my SPI configuration (board setup) in the end of the mail.
>>
> 
> Not looked into m25p80 code, but CS is normally asserted before a transfer
> begins and deasserted after a transfer is done. I doubt there are some cases
> where the transfer is not set up correctly.

Well, in this case when doing a read you must set up a write transfer to 
write the read command + address and then a read transfer to actually 
read back the data. In this case the cs musn't be deasserted between 
transfers because this means the operation is terminated.

> Actually, cs_assert() and cs_deassert() are there in pxa2xx_spi.c as two very
> good debugging point to print out the transfer information to see if they are
> setup correctly.

When I look at how these two are used I get a an serie of assert, 
assert, deassert for each read operation (which should be correct 
behaviour). This suggests that something else is deasserting the cs or 
that the CPU is doing something on it's own accord. Hmmm...

Regards,

	/Jakob

  reply	other threads:[~2010-04-20 15:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 11:58 SPI trouble on Colibri 270 (PXA) Jakob Viketoft
2010-04-20 13:14 ` Eric Miao
2010-04-20 15:20   ` Jakob Viketoft [this message]
2010-04-21  9:44     ` Marek Vasut
2010-04-21 10:47       ` Eric Miao
2010-04-21 11:11         ` Martin Guy
2010-04-21 11:42           ` Eric Miao
2010-04-21 11:49             ` Martin Guy
2010-04-21 12:47           ` Jakob Viketoft
2010-04-21 14:53             ` Martin Guy
     [not found]             ` <g2xf17812d71004210607n4f3d82f2m4712d3bb97ef4924@mail.gmail.com>
2010-04-22 14:36               ` Jakob Viketoft
2010-04-23 16:55                 ` Vernon Sauder
2010-04-23 19:57                   ` Jakob Viketoft
2010-04-23 23:40                     ` Eric Miao
2010-04-21 12:12         ` Marek Vasut

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=4BCDC645.5090001@viketoft.se \
    --to=jakob@viketoft.se \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.