• Akinobu Mita's avatar
    spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer · 81261359
    Akinobu Mita authored
    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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    81261359
spi-omap2-mcspi.c 38.2 KB