Commit 8d00f981 authored by Jon Lin's avatar Jon Lin Committed by Mark Brown

spi: rockchip-sfc: Remove redundant IO operations

Coherent dma buffer is uncached and memcpy is enough.
Signed-off-by: default avatarJon Lin <jon.lin@rock-chips.com>
Link: https://lore.kernel.org/r/20210821124925.6066-1-jon.lin@rock-chips.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7a4697b2
...@@ -453,7 +453,7 @@ static int rockchip_sfc_xfer_data_dma(struct rockchip_sfc *sfc, ...@@ -453,7 +453,7 @@ static int rockchip_sfc_xfer_data_dma(struct rockchip_sfc *sfc,
dev_dbg(sfc->dev, "sfc xfer_dma len=%x\n", len); dev_dbg(sfc->dev, "sfc xfer_dma len=%x\n", len);
if (op->data.dir == SPI_MEM_DATA_OUT) if (op->data.dir == SPI_MEM_DATA_OUT)
memcpy_toio(sfc->buffer, op->data.buf.out, len); memcpy(sfc->buffer, op->data.buf.out, len);
ret = rockchip_sfc_fifo_transfer_dma(sfc, sfc->dma_buffer, len); ret = rockchip_sfc_fifo_transfer_dma(sfc, sfc->dma_buffer, len);
if (!wait_for_completion_timeout(&sfc->cp, msecs_to_jiffies(2000))) { if (!wait_for_completion_timeout(&sfc->cp, msecs_to_jiffies(2000))) {
...@@ -462,7 +462,7 @@ static int rockchip_sfc_xfer_data_dma(struct rockchip_sfc *sfc, ...@@ -462,7 +462,7 @@ static int rockchip_sfc_xfer_data_dma(struct rockchip_sfc *sfc,
} }
rockchip_sfc_irq_mask(sfc, SFC_IMR_DMA); rockchip_sfc_irq_mask(sfc, SFC_IMR_DMA);
if (op->data.dir == SPI_MEM_DATA_IN) if (op->data.dir == SPI_MEM_DATA_IN)
memcpy_fromio(op->data.buf.in, sfc->buffer, len); memcpy(op->data.buf.in, sfc->buffer, len);
return ret; return ret;
} }
......
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