aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-27 15:10:26 -0400
committerMark Brown <broonie@linaro.org>2013-09-30 07:53:35 -0400
commit67651b29ef15e5ef9897ed8cb9072222c4cf3432 (patch)
treef5f33a4c05bfbb90ab682d57073717bfec9ea906
parent0cab71e7014dc73a84e1d14d9b02e39c48241580 (diff)
spi/s3c64xx: Flush FIFOs prior to cleaning up transfer
Ensure that the FIFOs are fully drained before we deassert /CS or do any delays that have been requested in order to ensure that the behaviour visible on the bus matches that which was requested by the caller. Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/spi/spi-s3c64xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 229c6b994be3..2e267ce9dc19 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -960,6 +960,8 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
960 goto out; 960 goto out;
961 } 961 }
962 962
963 flush_fifo(sdd);
964
963 if (xfer->delay_usecs) 965 if (xfer->delay_usecs)
964 udelay(xfer->delay_usecs); 966 udelay(xfer->delay_usecs);
965 967
@@ -972,8 +974,6 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
972 } 974 }
973 975
974 msg->actual_length += xfer->len; 976 msg->actual_length += xfer->len;
975
976 flush_fifo(sdd);
977 } 977 }
978 978
979out: 979out: