未验证 提交 36735783 编写于 作者: H Hiromitsu Yamasaki 提交者: 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: NHiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: NDirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 2bd6bf03
...@@ -900,7 +900,7 @@ static int sh_msiof_transfer_one(struct spi_master *master, ...@@ -900,7 +900,7 @@ static int sh_msiof_transfer_one(struct spi_master *master,
break; break;
copy32 = copy_bswap32; copy32 = copy_bswap32;
} else if (bits <= 16) { } else if (bits <= 16) {
if (l & 1) if (l & 3)
break; break;
copy32 = copy_wswap32; copy32 = copy_wswap32;
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册