linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/2] spi/bcm63xx: fix multi transfer messages
@ 2013-02-03 14:15 Jonas Gorski
       [not found] ` <1359900913-4472-1-git-send-email-jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Jonas Gorski @ 2013-02-03 14:15 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Maxime Bizon, Mark Brown, Florian Fainelli, Kevin Cernekee

The bcm63xx SPI controller does not support keeping CS up after doing a
transfer. Since this is problematic for most typical use cases, this
patchset introduces a workaround by combining small enough messages
to one transfer, rejecting anything that can't be fulfilled with the
hardware.

Patch one properly rejects anything impossible to transfer with these
limitations.
Patch two introduces logic for combining transfers to one to be able to
use it for typical use cases (register accesses and flash access).

Build and run tested on a BCM6368 with a SPI controlled switch attached
requiring write-then-read with CS asserted.

Changes V1 -> V2:
 * split into two patches
 * fixed return type of bcm63xx_txrx_bufs()
 * slightly reworked bcm63xx_txrx_bufs, obsoleting one local variable
 * added a bit more comments in the code
 * added error messages indicated why transfers were rejected

Jonas Gorski (2):
  spi/bcm63xx: reject transfers unable to transfer
  spi/bcm63xx: work around inability to keep CS up

 drivers/spi/spi-bcm63xx.c |  179 +++++++++++++++++++++++++++++++--------------
 1 file changed, 125 insertions(+), 54 deletions(-)

-- 
1.7.10.4


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-02-05 17:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-03 14:15 [PATCH V2 0/2] spi/bcm63xx: fix multi transfer messages Jonas Gorski
     [not found] ` <1359900913-4472-1-git-send-email-jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2013-02-03 14:15   ` [PATCH V2 1/2] spi/bcm63xx: reject transfers unable to transfer Jonas Gorski
     [not found]     ` <1359900913-4472-2-git-send-email-jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2013-02-05 14:32       ` Grant Likely
2013-02-03 14:15   ` [PATCH V2 2/2] spi/bcm63xx: work around inability to keep CS up Jonas Gorski
     [not found]     ` <1359900913-4472-3-git-send-email-jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2013-02-05 14:35       ` Grant Likely
2013-02-05 15:00         ` Jonas Gorski
     [not found]           ` <20130205160004.2817a8b08ba7bb8c2de9a382-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2013-02-05 17:14             ` Grant Likely
2013-02-04 13:29   ` [PATCH V2 0/2] spi/bcm63xx: fix multi transfer messages Florian Fainelli
2013-02-05 14:30   ` Grant Likely
     [not found]     ` <20130205150441.GC4720@opensource.wolfsonmicro.com>
     [not found]       ` <20130205150441.GC4720-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2013-02-05 17:14         ` Grant Likely

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).