linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/5] spi: spi-message transformation framework
@ 2015-12-07 15:21 kernel-TqfNSX0MhmxHKSADF0wUEw
       [not found] ` <1449501708-2228-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: kernel-TqfNSX0MhmxHKSADF0wUEw @ 2015-12-07 15:21 UTC (permalink / raw)
  To: Mark Brown, Stephen Warren, Lee Jones, Eric Anholt,
	linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Martin Sperl

From: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>

This patchset implements a spi-message transformation framework in
SPI-core, that allows drivers to transfor individual spi messages
into something that can more easily get handled by the HW.

This would typically be used for HW which has some limitations on
DMA alignment or max transfer sizes.

This patchset implements at this very moment only splitting
transfers longer than 60k in size into multiple transfers.

Future patches based on this basic patchset:
* split misalligned transfers (there are probably multiple
  variations necessary for different HW)
* merge multiple small transfers into a single transfer

The patch-set essentially is based arround spi resource
management on a spi_message basis, which was inspired by
devres.

This framework could also get used to handle spi_unmap_buf
calls with the framework.

Right now the drivers themselves have to implement
spi_master.translate_message, but as soon as the "typical"
HW-variations become apparent this may be reduced to assign
one of a set of "standard" translation methods to
spi_master.translate_message instead, but this may require
some additional parametrization of the HW characteristics.

The whole patch set has been tested successfully on a RPI with:
* spi_loopback_test
* enc28j60
* fb_st7735r - framebuffer playing BigBuckBunny
* mmc-spi with an out of tree patch to work arround the mmc_spi
  internal dma mapping issues, that inhibits the driver from working
  correctly - this got introduced with commit 0589342c27944e50
   ("of: set dma_mask to point to coherent_dma_mask")

Martin Sperl (5):
  spi: core: added spi_resource management
  spi: core: add spi_replace_transfers method
  spi: core: add spi_split_transfers_maxsize
  spi: core add spi_master.translate_message
  spi: bcm2835: make use of the spi_translate_message methods

 drivers/spi/spi-bcm2835.c |   31 +++--
 drivers/spi/spi.c         |  339 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/spi/spi.h   |   92 ++++++++++++
 3 files changed, 448 insertions(+), 14 deletions(-)

--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-12-11 16:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-07 15:21 [PATCH V2 0/5] spi: spi-message transformation framework kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found] ` <1449501708-2228-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-12-07 15:21   ` [PATCH V2 1/5] spi: core: added spi_resource management kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found]     ` <1449501708-2228-2-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-12-11 14:30       ` Andy Shevchenko
     [not found]         ` <CAHp75Vf4UGOAz5ZLCBtCeNitYY1h0P6Ae7_puVTfe+KweyeeAA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-11 14:55           ` Martin Sperl
2015-12-07 15:21   ` [PATCH V2 2/5] spi: core: add spi_replace_transfers method kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found]     ` <1449501708-2228-3-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-12-11 14:37       ` Andy Shevchenko
     [not found]         ` <CAHp75Vd_7NBibKFPq++JuDiWp9zkwu9iPrjZyKK6XoL6Lr_S0g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-11 16:04           ` Martin Sperl
2015-12-07 15:21   ` [PATCH V2 3/5] spi: core: add spi_split_transfers_maxsize kernel-TqfNSX0MhmxHKSADF0wUEw
2015-12-07 15:21   ` [PATCH V2 4/5] spi: core add spi_master.translate_message kernel-TqfNSX0MhmxHKSADF0wUEw
2015-12-07 15:21   ` [PATCH V2 5/5] spi: bcm2835: split long transfers kernel-TqfNSX0MhmxHKSADF0wUEw
2015-12-09  9:38   ` [PATCH V2 0/5] spi: spi-message transformation framework Martin Sperl

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