From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Mark Brown <broonie@kernel.org>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
thomas.petazzoni@bootlin.com, alexandre.belloni@bootlin.com
Subject: [PATCH 0/5] spi: imx: Improve non 8-bit aligned words and dynamic bursts
Date: Tue, 17 Jul 2018 15:43:06 +0200 [thread overview]
Message-ID: <20180717134311.26780-1-maxime.chevallier@bootlin.com> (raw)
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 4th 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
next reply other threads:[~2018-07-17 13:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 13:43 Maxime Chevallier [this message]
2018-07-17 13:43 ` [PATCH 1/5] spi: imx: Remove duplicate variable assignments Maxime Chevallier
2018-07-17 13:43 ` [PATCH 2/5] spi: imx: Use dynamic bursts only when bits_per_word is 8, 16 or 32 Maxime Chevallier
2018-07-17 13:43 ` [PATCH 3/5] spi: imx: Use correct number of bytes per words Maxime Chevallier
2018-07-17 13:43 ` [PATCH 4/5] spi: imx: remove unnecessary check in spi_imx_can_dma Maxime Chevallier
2018-07-17 13:43 ` [PATCH 5/5] spi: imx: Use the longuest possible burst size when in dynamic_burst Maxime Chevallier
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=20180717134311.26780-1-maxime.chevallier@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®