[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1273038349.3702.54.camel@localhost>
Date: Wed, 05 May 2010 08:45:49 +0300
From: Artem Bityutskiy <dedekind1@...il.com>
To: H Hartley Sweeten <hartleys@...ionengravers.com>
Cc: Linux Kernel <linux-kernel@...r.kernel.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"ryan@...ewatersys.com" <ryan@...ewatersys.com>,
"andre@...ewatersys.com" <andre@...ewatersys.com>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] sst25l.c: fix multi-part messages with broken spi
masters
On Thu, 2010-04-29 at 13:34 -0500, H Hartley Sweeten wrote:
> Some SPI masters (ep93xx) have limitations when using the SFRMOUT
> signal for the spi device chip select. The SFRMOUT signal is
> only asserted as long as the spi transmit fifo contains data. As
> soon as the last bit is clocked into the receive fifo it gets
> deasserted.
>
> The functions sst25l_status and sst25l_match_device use the API
> function spi_write_then_read to write a command to the flash then
> read the response back. This API function creates a two part spi
> message for the write then read. When this message is transferred
> the SFRMOUT signal ends up getting deasserted after the command
> phase. This causes the command to get aborted by the device so
> the read phase returns invalid data.
>
> By changing sst25l_status and sst25l_match_device to use a single
> transfer synchronous message, the SFRMOUT signal stays asserted
> during the entire message so the correct data always gets returned.
>
> This change will have no effect on SPI masters which use a chip
> select mechanism (GPIO's, etc.) which does stay asserted correctly.
> As a bonus, the single transfer synchronous messages complete faster
> than multi-part messages.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
> Cc: David Woodhouse <dwmw2@...radead.org>
> Cc: Artem Bityutskiy <dedekind1@...il.com>
> Cc: Andre Renaud <andre@...ewatersys.com>
> Cc: Ryan Mallon <ryan@...ewatersys.com>
Pushed to l2-mtd-2.6 / dunno.
But please, notice for future:
1. It is much nicer to put something like [PATCH v2] when you re-send.
2. In MTD we prefix everything with mtd:
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists