aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-10-13 22:32:56 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-17 03:11:09 -0400
commit44968466cfb969f960dbe422bbc785117f497729 (patch)
treedac3135460d2fa8dc0a07ff0e38b678812050c40 /drivers
parentd856f1eb56ae3d935fb502441aa37b650aeba683 (diff)
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')
-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,
323 if (!ret) { 323 if (!ret) {
324 dev_err(ssp->dev, "DMA transfer timeout\n"); 324 dev_err(ssp->dev, "DMA transfer timeout\n");
325 ret = -ETIMEDOUT; 325 ret = -ETIMEDOUT;
326 dmaengine_terminate_all(ssp->dmach);
326 goto err_vmalloc; 327 goto err_vmalloc;
327 } 328 }
328 329