[PATCH] mxs/spi: Restart the block after unsuccessful transfer

Marek Vasut marex at denx.de
Thu Aug 23 22:34:18 EDT 2012


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 at denx.de>
Cc: Chris Ball <cjb at laptop.org>
Cc: Shawn Guo <shawn.guo at linaro.org>
Cc: Mark Brown <broonie at opensource.wolfsonmicro.com>
Cc: Fabio Estevam <fabio.estevam at freescale.com>
---
 drivers/spi/spi-mxs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 746359e..8075683 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -445,8 +445,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;
 	}
-- 
1.7.10.4




More information about the linux-arm-kernel mailing list