]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 22 Mar 2017 00:18:26 +0000 (09:18 +0900)
committerMark Brown <broonie@kernel.org>
Fri, 24 Mar 2017 18:50:23 +0000 (18:50 +0000)
commit812613591cb652344186c4cd912304ed02138566
tree256955ff7a022f11ec2a9977be3415fb6e793e70
parentfafd67940774733fa97f4b09412aea6981b82e0a
spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer

When running the spi-loopback-test with slower clock rate like 10 KHz,
the test for 251 bytes transfer was failed.  This failure triggered an
spi-omap2-mcspi's error message "DMA RX last word empty".

This message means that PIO for reading the remaining bytes due to the
DMA transfer length reduction is failed.  This problem can be fixed by
polling OMAP2_MCSPI_CHSTAT_RXS bit in channel status register to wait
until the receive buffer register is filled.

Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-omap2-mcspi.c