Commit 36735783 authored by Hiromitsu Yamasaki's avatar Hiromitsu Yamasaki Committed by Mark Brown

spi: sh-msiof: Fix DMA transfer size check

DMA supports 32-bit words only,
even if BITLEN1 of SITMDR2 register is 16bit.

Fixes: b0d0ce8b ("spi: sh-msiof: Add DMA support")
Signed-off-by: default avatarHiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2bd6bf03
......@@ -900,7 +900,7 @@ static int sh_msiof_transfer_one(struct spi_master *master,
break;
copy32 = copy_bswap32;
} else if (bits <= 16) {
if (l & 1)
if (l & 3)
break;
copy32 = copy_wswap32;
} else {
......
Markdown is supported
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