]> asedeno.scripts.mit.edu Git - linux.git/commit
spi: imx: Use the longuest possible burst size when in dynamic_burst
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Tue, 17 Jul 2018 14:31:54 +0000 (16:31 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 24 Jul 2018 14:58:35 +0000 (15:58 +0100)
commit2ca300ac6e7b5143e0c03cfc91bb064dcad376f4
treebe20d13819db4fac0931077244c047193138eebf
parent0486dd4d6111b969a81b9ce63bfaf22e414839a4
spi: imx: Use the longuest possible burst size when in dynamic_burst

Dynamic burst mode allows to group together multiple words and send them
in one continuous burst. When the number of bytes to be sent is not a
strict multiple of the FIFO entry size (32 bits), the controller expects
the non aligned bits to be sent first.

This commit adds support for this particular constraint, avoiding the
need to send the non-aligned bytes one by one at the end of the
transfer, speeding-up transfer speed in that case.

With this method, a transfer is divided into multiple bursts, limited in
size by the maximum amount of data that the controller can transfer in
one continuous burst (which is 512 bytes).

The non-512 byte part of the transfer is sent first. The remaining bytes
to be transferred in the current burst is stored in the 'remainder'
field.

With this method, the read_u32 field is no longer necessary, and is
removed.

This was tested on imx6 solo and imx6 quad.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c