spi: img-spfi: Enable controller before starting TX DMA
authorAndrew Bresticker <abrestic@chromium.org>
Tue, 16 Dec 2014 21:05:44 +0000 (13:05 -0800)
committerMark Brown <broonie@kernel.org>
Mon, 22 Dec 2014 17:52:07 +0000 (17:52 +0000)
It is recommended that the SPFI controller be enabled (i.e. setting
SPFI_EN in SPFI_CONTROL) before TX DMA begins.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-img-spfi.c

index b410499..cd14556 100644 (file)
@@ -390,14 +390,14 @@ static int img_spfi_start_dma(struct spi_master *master,
                dma_async_issue_pending(spfi->rx_ch);
        }
 
+       spfi_start(spfi);
+
        if (xfer->tx_buf) {
                spfi->tx_dma_busy = true;
                dmaengine_submit(txdesc);
                dma_async_issue_pending(spfi->tx_ch);
        }
 
-       spfi_start(spfi);
-
        return 1;
 
 stop_dma: