spi: Introduce dspi_slave_abort() function for NXP's dspi SPI driver
authorLukasz Majewski <lukma@denx.de>
Tue, 24 Sep 2019 11:05:47 +0000 (13:05 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 1 Oct 2019 11:35:39 +0000 (12:35 +0100)
commitf4b323905d8b3e28b2a9cef9325dbec1b0f7f064
tree4344005d9b7bf15abc8a7358cb84aa18e65211bb
parent3f049e7df22e563b04fd576bdc37e6b3e2c7a996
spi: Introduce dspi_slave_abort() function for NXP's dspi SPI driver

This change provides the dspi_slave_abort() function, which is a callback
for slave_abort() method of SPI controller generic driver.

As in the SPI slave mode the transmission is driven by master, any
distortion may cause the slave to enter undefined internal state.
To avoid this problem the dspi_slave_abort() terminates all pending and
ongoing DMA transactions (with sync) and clears internal FIFOs.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Link: https://lore.kernel.org/r/20190924110547.14770-3-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-dspi.c