struct dw_spi *dws = arg;
clear_bit(DW_SPI_TX_BUSY, &dws->dma_chan_busy);
- if (test_bit(DW_SPI_RX_BUSY, &dws->dma_chan_busy))
+ if (test_bit(DW_SPI_RX_BUSY, &dws->dma_chan_busy)) {
+ dw_writel(dws, DW_SPI_DMARDLR, 0);
return;
+ }
complete(&dws->dma_completion);
}
nents = max(xfer->tx_sg.nents, xfer->rx_sg.nents);
+ dw_writel(dws, DW_SPI_DMARDLR, xfer->tx_buf ? (dws->rxburst - 1) : 0);
+
/*
* Execute normal DMA-based transfer (which submits the Rx and Tx SG
* lists directly to the DMA engine at once) if either full hardware