Hi,
obviously the LS1043/1046 don't provide cache/DMA coherency for I2C device DMA?!
So the write buffer stays in cpu cache and is not visible to DMA.
Who is the maintainer for this driver now?
This patch is working for me now (altough i could only test the write-part)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index af352886ef6f..54e2a7b88f0a 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -441,6 +441,9 @@ static void i2c_imx_dma_callback(void *arg)
struct imx_i2c_struct *i2c_imx = (struct imx_i2c_struct *)arg;
struct imx_i2c_dma *dma = i2c_imx->dma;
+ if(dma->dma_transfer_dir == DMA_DEV_TO_MEM)
+ dma_sync_single_for_device(&i2c_imx->adapter.dev, dma->dma_buf, dma->dma_len, dma->dma_transfer_dir);
+
dma_unmap_single(dma->chan_using->device->dev, dma->dma_buf,
dma->dma_len, dma->dma_data_dir);
complete(&dma->cmd_complete);
@@ -461,7 +464,8 @@ static int i2c_imx_dma_xfer(struct imx_i2c_struct *i2c_imx,
goto err_map;
}
+ if(dma->dma_transfer_dir == DMA_MEM_TO_DEV)
+ dma_sync_single_for_device(dev, dma->dma_buf, dma->dma_len, dma->dma_transfer_dir);
txdesc = dmaengine_prep_slave_single(dma->chan_using, dma->dma_buf,
dma->dma_len, dma->dma_transfer_dir,