Skip to content

Commit

Permalink
spi: sirf: add fifo reset/start for cmd transfer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Qipan Li authored and Mark Brown committed Sep 4, 2014
1 parent f2a08b4 commit 810a58b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/spi/spi-sirf.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ static int spi_sirfsoc_cmd_transfer(struct spi_device *spi,
u32 cmd;

sspi = spi_master_get_devdata(spi->master);
writel(SIRFSOC_SPI_FIFO_RESET, sspi->base + SIRFSOC_SPI_TXFIFO_OP);
writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP);
memcpy(&cmd, sspi->tx, t->len);
if (sspi->word_width == 1 && !(spi->mode & SPI_LSB_FIRST))
cmd = cpu_to_be32(cmd) >>
Expand Down

0 comments on commit 810a58b

Please sign in to comment.