Commit cfb81f22 authored by Vijaya Krishna Nivarthi's avatar Vijaya Krishna Nivarthi Committed by Mark Brown

spi: spi-qcom-qspi: Call dma_wmb() after setting up descriptors

After setting up dma descriptors and before initiaiting dma transfer, call
dma_wmb() to ensure all writes go through.
This doesn't fix any reported problem but is added for safety.
Signed-off-by: default avatarVijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
Fixes: b5762d95 ("spi: spi-qcom-qspi: Add DMA mode support")
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/1690285689-30233-4-git-send-email-quic_vnivarth@quicinc.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f7ba36d3
......@@ -443,8 +443,10 @@ static int qcom_qspi_transfer_one(struct spi_master *master,
ret = qcom_qspi_setup_dma_desc(ctrl, xfer);
if (ret != -EAGAIN) {
if (!ret)
if (!ret) {
dma_wmb();
qcom_qspi_dma_xfer(ctrl);
}
goto exit;
}
dev_warn_once(ctrl->dev, "DMA failure, falling back to PIO\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment