Skip to content
Commit 6fd6fd68 authored by Zachary Zhang's avatar Zachary Zhang Committed by Mark Brown
Browse files

spi: armada-3700: Fix padding when sending not 4-byte aligned data



In 4-byte transfer mode, extra padding/dummy bytes '0xff' would be
sent in write operation if TX data is not 4-byte aligned since the
SPI data register is always shifted out as whole 4 bytes.

Fix this by using the header count feature that allows to transfer 0 to
4 bytes. Use it to actually send the first 1 to 3 bytes of data before
the rest of the buffer that will hence be 4-byte aligned.

Signed-off-by: default avatarZachary Zhang <zhangzg@marvell.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@free-electrons.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 747e1f60
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment