mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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>
This commit is contained in:
parent
f2a08b4046
commit
810a58b025
@ -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) >>
|
||||
|
Loading…
Reference in New Issue
Block a user