summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-08-24 04:34:18 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-27 18:36:52 +0200
commitc895db0fb2c9e77fd94ba7995e2a01652a91910c (patch)
treeb85c0d104c8c82d13300ab8e51ec35de7a06cdc1 /drivers/spi
parentspi/mxs: Add SSP/SPI device tree documentation (diff)
downloadlinux-c895db0fb2c9e77fd94ba7995e2a01652a91910c.tar.xz
linux-c895db0fb2c9e77fd94ba7995e2a01652a91910c.zip
mxs/spi: Restart the block after unsuccessful transfer
Restart the SSP block in case the SSP transfer failed in any way. The block hung in some cases otherwise. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chris Ball <cjb@laptop.org> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-mxs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 130a43688352..447f917fe66f 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -439,8 +439,10 @@ static int mxs_spi_transfer_one(struct spi_master *master,
}
m->actual_length += t->len;
- if (status)
+ if (status) {
+ stmp_reset_block(ssp->base);
break;
+ }
first = last = 0;
}