Linux Samsung SOC development
 help / color / mirror / Atom feed
* [PATCH 1/6] spi/s3c64xx: Flush FIFOs prior to cleaning up transfer
@ 2013-09-27 19:44 Mark Brown
  2013-09-27 19:44 ` [PATCH 2/6] spi/s3c64xx: Check that clock enables succeed on runtime resume Mark Brown
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Mark Brown @ 2013-09-27 19:44 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: linux-samsung-soc, linux-spi, linaro-kernel,
	Łukasz Czerwiński, Mark Brown

From: Mark Brown <broonie@linaro.org>

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>
---
 drivers/spi/spi-s3c64xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 229c6b9..2e267ce 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:
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-27 19:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 19:44 [PATCH 1/6] spi/s3c64xx: Flush FIFOs prior to cleaning up transfer Mark Brown
2013-09-27 19:44 ` [PATCH 2/6] spi/s3c64xx: Check that clock enables succeed on runtime resume Mark Brown
2013-09-27 19:44 ` [PATCH 3/6] spi/s3c64xx: Remove unused gpios field from driver data Mark Brown
2013-09-27 19:44 ` [PATCH 4/6] spi/s3c64xx: Use core cs_gpio field Mark Brown
2013-09-27 19:44 ` [PATCH 5/6] spi/s3c64xx: Factor transfer start out of enable/disable_cs() Mark Brown
2013-09-27 19:44 ` [PATCH 6/6] spi/s3c64xx: Enable GPIO /CS prior to starting hardware Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox