]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mxs/spi: Restart the block after unsuccessful transfer
authorMarek Vasut <marex@denx.de>
Fri, 24 Aug 2012 02:34:18 +0000 (04:34 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 27 Aug 2012 16:36:52 +0000 (09:36 -0700)
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>
drivers/spi/spi-mxs.c

index 130a436883520686870095ecd071bb4fc042c505..447f917fe66f77d38ad6c49ebe2288b348b7373e 100644 (file)
@@ -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;
        }