From: vernoninhand@gmail.com (Vernon Sauder)
To: linux-arm-kernel@lists.infradead.org
Subject: SPI trouble on Colibri 270 (PXA)...
Date: Fri, 23 Apr 2010 12:55:20 -0400 [thread overview]
Message-ID: <4BD1D0F8.60705@gmail.com> (raw)
In-Reply-To: <4BD05ED1.4020806@viketoft.se>
Jakob Viketoft wrote, On 04/22/2010 10:36 AM:
> Eric Miao wrote:
>> On Wed, Apr 21, 2010 at 8:47 PM, Jakob Viketoft <jakob@viketoft.se>
>> wrote:
>>> Martin Guy wrote:
>>>> On 4/21/10, Eric Miao <eric.y.miao@gmail.com> wrote:
>>>>
>>>>> I thought we were talking about SPI?
>>>> We are. It affects boards that have a single SD/MMC card on the SPI
>>>> bus and use SFRMOUT as the chip select line, which impacts how the SPI
>>>> driver needs to handle multi-part messages without dropping CS between
>>>> transfers
>>> Does this mean that this is a know issue with the pxa2xx spi driver?
>>> At the
>>> moment I'm rather pressed for time and have instead opted for
>>> compressing
>>> the two transfers (read command and actual read) into one.
>>
>> I'm expecting this to be correct code, i.e. by combining read command
>> transfer and actual read transfer into a single message, with .cs_change
>> indicating that CS not changed during transfer. No?
>
> The original code currently combines the two transfers in one message as
> you say (leaving CS asserted unless cs_change is set). However, I don't
> know if it's a problem with scheduling or that the interrupt takes too
> long to serve, but on my platform the two transfers (in the same
> message) doesn't go back-to-back as they should and CS gets deasserted
> in the middle. Thus I have combined the two transfers into one and the
> message only hold this single transfer. Now things work at my end, but
> it's annoying that I don't have time to track down the real issue at the
> moment...
>
> /Jakob
>
As part of this thread:
http://permalink.gmane.org/gmane.linux.kernel.spi.devel/1517
I added the following note to Documentation/spi/pxa2xx. I have not
checked to see if the patch hit mainline. Is this part of the answer to
your question?
> +NOTE: the SPI driver cannot control the chip select if SSPFRM is used, so the
> +chipselect is dropped after each spi_transfer. Most devices need chip select
> +asserted around the complete message. Use SSPFRM as a GPIO (through cs_control)
> +to accomodate these chips.
That was my solution to using the pxa2xx SPI with M25Pxx flash.
--
Regards,
Vernon Sauder
(: !Have a great day! :)
next prev parent reply other threads:[~2010-04-23 16:55 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
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 [this message]
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=4BD1D0F8.60705@gmail.com \
--to=vernoninhand@gmail.com \
--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.