From: Qipan Li Date: Tue, 2 Sep 2014 09:02:34 +0000 (+0800) Subject: spi: sirf: add fifo reset/start for cmd transfer X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=810a58b0256b24f194dda5ca1e705204ca703f7b;p=linux-beck.git 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 Signed-off-by: Barry Song Signed-off-by: Mark Brown --- 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, 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) >>