spi: sh-msiof: Configure DMA slave bus width
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 6 Aug 2014 12:59:04 +0000 (14:59 +0200)
committerMark Brown <broonie@linaro.org>
Sat, 16 Aug 2014 22:14:30 +0000 (17:14 -0500)
The new Renesas R-Car Gen2 DMA Controller driver (rcar-dmac) requires
explicit configuration of the DMA slave bus width.
Hardcode the DMA transfer size to 4 bytes, as MSIOF DMA is limited to
32-bit words.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-sh-msiof.c

index 887c2084130f520a3f2814c8c46fb37e2aaa5a16..b19cbb4cb4a0cbade59aea36381d4986bc1d50c1 100644 (file)
@@ -987,10 +987,13 @@ static struct dma_chan *sh_msiof_request_dma_chan(struct device *dev,
        memset(&cfg, 0, sizeof(cfg));
        cfg.slave_id = id;
        cfg.direction = dir;
-       if (dir == DMA_MEM_TO_DEV)
+       if (dir == DMA_MEM_TO_DEV) {
                cfg.dst_addr = port_addr;
-       else
+               cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+       } else {
                cfg.src_addr = port_addr;
+               cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+       }
 
        ret = dmaengine_slave_config(chan, &cfg);
        if (ret) {