mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
spi: spi-msm-geni: Propagate missing change from 4.19 to 5.4
Propagate following change from 4.19 to 5.4 for SPI driver.
'commit 185ecd35b11f ("spi: spi-geni-qcom: Reset the dma engine on
failure")'.
Change-Id: I3839d5bc773e7d7ea71ba6ff611f55f4869000f3
Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
This commit is contained in:
parent
182605a377
commit
ce64610d0e
1 changed files with 21 additions and 3 deletions
|
|
@ -1106,12 +1106,30 @@ static void handle_fifo_timeout(struct spi_geni_master *mas,
|
|||
"Failed to cancel/abort m_cmd\n");
|
||||
}
|
||||
if (mas->cur_xfer_mode == SE_DMA) {
|
||||
if (xfer->tx_buf)
|
||||
if (xfer->tx_buf) {
|
||||
reinit_completion(&mas->xfer_done);
|
||||
writel_relaxed(1, mas->base +
|
||||
SE_DMA_TX_FSM_RST);
|
||||
timeout =
|
||||
wait_for_completion_timeout(&mas->xfer_done, HZ);
|
||||
if (!timeout)
|
||||
dev_err(mas->dev,
|
||||
"DMA TX RESET failed\n");
|
||||
geni_se_tx_dma_unprep(mas->wrapper_dev,
|
||||
xfer->tx_dma, xfer->len);
|
||||
if (xfer->rx_buf)
|
||||
}
|
||||
if (xfer->rx_buf) {
|
||||
reinit_completion(&mas->xfer_done);
|
||||
writel_relaxed(1, mas->base +
|
||||
SE_DMA_RX_FSM_RST);
|
||||
timeout =
|
||||
wait_for_completion_timeout(&mas->xfer_done, HZ);
|
||||
if (!timeout)
|
||||
dev_err(mas->dev,
|
||||
"DMA RX RESET failed\n");
|
||||
geni_se_rx_dma_unprep(mas->wrapper_dev,
|
||||
xfer->rx_dma, xfer->len);
|
||||
xfer->rx_dma, xfer->len);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue