Commit 67651b29 authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@linaro.org>
parent 0cab71e7
...@@ -960,6 +960,8 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master, ...@@ -960,6 +960,8 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
goto out; goto out;
} }
flush_fifo(sdd);
if (xfer->delay_usecs) if (xfer->delay_usecs)
udelay(xfer->delay_usecs); udelay(xfer->delay_usecs);
...@@ -972,8 +974,6 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master, ...@@ -972,8 +974,6 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
} }
msg->actual_length += xfer->len; msg->actual_length += xfer->len;
flush_fifo(sdd);
} }
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment