aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sirf.c
diff options
context:
space:
mode:
authorQipan Li <Qipan.Li@csr.com>2014-09-02 05:02:34 -0400
committerMark Brown <broonie@kernel.org>2014-09-04 18:37:23 -0400
commit810a58b0256b24f194dda5ca1e705204ca703f7b (patch)
tree1367104413c64322be9636aca122df7b0dd4d4c1 /drivers/spi/spi-sirf.c
parentf2a08b404691ef3e7be6ce81c185335cfc68b6db (diff)
spi: sirf: add fifo reset/start for cmd transfer
for command mode spi transfer, HW spec requires to do fifo reset work to clear FIFO status. Signed-off-by: Qipan Li <Qipan.Li@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-sirf.c')
-rw-r--r--drivers/spi/spi-sirf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index 1a5161336730..6f0602fd7401 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -312,6 +312,8 @@ static int spi_sirfsoc_cmd_transfer(struct spi_device *spi,
312 u32 cmd; 312 u32 cmd;
313 313
314 sspi = spi_master_get_devdata(spi->master); 314 sspi = spi_master_get_devdata(spi->master);
315 writel(SIRFSOC_SPI_FIFO_RESET, sspi->base + SIRFSOC_SPI_TXFIFO_OP);
316 writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP);
315 memcpy(&cmd, sspi->tx, t->len); 317 memcpy(&cmd, sspi->tx, t->len);
316 if (sspi->word_width == 1 && !(spi->mode & SPI_LSB_FIRST)) 318 if (sspi->word_width == 1 && !(spi->mode & SPI_LSB_FIRST))
317 cmd = cpu_to_be32(cmd) >> 319 cmd = cpu_to_be32(cmd) >>