Skip to content

Commit 8d00f98

Browse files
Jon Linbroonie
authored andcommitted
spi: rockchip-sfc: Remove redundant IO operations
Coherent dma buffer is uncached and memcpy is enough. Signed-off-by: Jon Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 7a4697b commit 8d00f98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi-rockchip-sfc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ static int rockchip_sfc_xfer_data_dma(struct rockchip_sfc *sfc,
453453
dev_dbg(sfc->dev, "sfc xfer_dma len=%x\n", len);
454454

455455
if (op->data.dir == SPI_MEM_DATA_OUT)
456-
memcpy_toio(sfc->buffer, op->data.buf.out, len);
456+
memcpy(sfc->buffer, op->data.buf.out, len);
457457

458458
ret = rockchip_sfc_fifo_transfer_dma(sfc, sfc->dma_buffer, len);
459459
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,
462462
}
463463
rockchip_sfc_irq_mask(sfc, SFC_IMR_DMA);
464464
if (op->data.dir == SPI_MEM_DATA_IN)
465-
memcpy_fromio(op->data.buf.in, sfc->buffer, len);
465+
memcpy(op->data.buf.in, sfc->buffer, len);
466466

467467
return ret;
468468
}

0 commit comments

Comments
 (0)