All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND 0/5] spi: imx: Improve non 8-bit aligned words and dynamic bursts
@ 2018-07-17 14:31 ` Maxime Chevallier
  0 siblings, 0 replies; 20+ messages in thread
From: Maxime Chevallier @ 2018-07-17 14:31 UTC (permalink / raw)
  To: Mark Brown
  Cc: Maxime Chevallier, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-arm-kernel, linux-spi, linux-kernel, thomas.petazzoni,
	alexandre.belloni

[Resend with i.MX platform maintainers and reviewers in Cc: ]

This series aims to improve PIO transfers on the SPI imx driver for several
use-cases, where bits_per_words isn't a multiple of 8, or when using
dynamic_burst mode.

The first patch is just a cosmetic cleanup of extra variable assignments

The second patch enforces the use of the dynamic_burst mode only when we
can pack words into the 32 bits FIFO entries. This avoid having to mask out the
remaining parts of the words, and avoid shifting extra clock ticks.

The 3rd and 4th patches fixes the way we compute the number of bytes per words,
by using 4 bytes to transfer 24 bits words as expected by the core.

Finally, the 5th patch reworks the way dynamic bursts are emitted, by shifting
out the non 4-bytes aligned parts first as expected by the imx SPI controller.

This avoid splitting out transfer when not necessary.

This was tested on imx6s and imx6q, with and without DMA, in single and full
duplex with a wide range of transfer sizes and bit_per_words values.

I however couldn't test the slave mode with these patches, so some review is
very welcomed, especially on the last patch.

Thanks,

Maxime

Maxime Chevallier (5):
  spi: imx: Remove duplicate variable assignments
  spi: imx: Use dynamic bursts only when bits_per_word is 8, 16 or 32
  spi: imx: Use correct number of bytes per words
  spi: imx: remove unnecessary check in spi_imx_can_dma
  spi: imx: Use the longuest possible burst size when in dynamic_burst

 drivers/spi/spi-imx.c | 162 +++++++++++++++++++++++++++++++-------------------
 1 file changed, 101 insertions(+), 61 deletions(-)

-- 
2.11.0


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

end of thread, other threads:[~2018-08-06  9:41 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 14:31 [PATCH RESEND 0/5] spi: imx: Improve non 8-bit aligned words and dynamic bursts Maxime Chevallier
2018-07-17 14:31 ` Maxime Chevallier
2018-07-17 14:31 ` [PATCH RESEND 1/5] spi: imx: Remove duplicate variable assignments Maxime Chevallier
2018-07-17 14:31   ` Maxime Chevallier
2018-08-06  8:56   ` Sascha Hauer
2018-08-06  8:56     ` Sascha Hauer
2018-07-17 14:31 ` [PATCH RESEND 2/5] spi: imx: Use dynamic bursts only when bits_per_word is 8, 16 or 32 Maxime Chevallier
2018-07-17 14:31   ` Maxime Chevallier
2018-08-06  9:41   ` Sascha Hauer
2018-08-06  9:41     ` Sascha Hauer
2018-07-17 14:31 ` [PATCH RESEND 3/5] spi: imx: Use correct number of bytes per words Maxime Chevallier
2018-07-17 14:31   ` Maxime Chevallier
2018-08-06  9:21   ` Sascha Hauer
2018-08-06  9:21     ` Sascha Hauer
2018-07-17 14:31 ` [PATCH RESEND 4/5] spi: imx: remove unnecessary check in spi_imx_can_dma Maxime Chevallier
2018-07-17 14:31   ` Maxime Chevallier
2018-08-06  9:17   ` Sascha Hauer
2018-08-06  9:17     ` Sascha Hauer
2018-07-17 14:31 ` [PATCH RESEND 5/5] spi: imx: Use the longuest possible burst size when in dynamic_burst Maxime Chevallier
2018-07-17 14:31   ` Maxime Chevallier

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.