summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-mxs.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-10-14 04:32:56 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-17 09:11:09 +0200
commit44968466cfb969f960dbe422bbc785117f497729 (patch)
treedac3135460d2fa8dc0a07ff0e38b678812050c40 /drivers/spi/spi-mxs.c
parentspi: mxs: Assign message status after transfer finished (diff)
downloadlinux-44968466cfb969f960dbe422bbc785117f497729.tar.xz
linux-44968466cfb969f960dbe422bbc785117f497729.zip
spi: mxs: Terminate DMA in case of DMA timeout
In case the SPI DMA times out, the DMA might still be in some kind of inconsistent state. Issue dmaengine_terminate_all() on the particular channel to kill off all operations before continuing. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi/spi-mxs.c')
-rw-r--r--drivers/spi/spi-mxs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 5a63bcd7a23d..86dd04d6bc87 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -323,6 +323,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs,
if (!ret) {
dev_err(ssp->dev, "DMA transfer timeout\n");
ret = -ETIMEDOUT;
+ dmaengine_terminate_all(ssp->dmach);
goto err_vmalloc;
}