summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-s3c64xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-27 21:10:26 +0200
committerMark Brown <broonie@linaro.org>2013-09-30 13:53:35 +0200
commit67651b29ef15e5ef9897ed8cb9072222c4cf3432 (patch)
treef5f33a4c05bfbb90ab682d57073717bfec9ea906 /drivers/spi/spi-s3c64xx.c
parentMerge remote-tracking branch 'spi/fix/s3c64xx' into spi-s3c64xx (diff)
downloadlinux-67651b29ef15e5ef9897ed8cb9072222c4cf3432.tar.xz
linux-67651b29ef15e5ef9897ed8cb9072222c4cf3432.zip
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>
Diffstat (limited to 'drivers/spi/spi-s3c64xx.c')
-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,
goto out;
}
+ flush_fifo(sdd);
+
if (xfer->delay_usecs)
udelay(xfer->delay_usecs);
@@ -972,8 +974,6 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
}
msg->actual_length += xfer->len;
-
- flush_fifo(sdd);
}
out: