summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-rspi.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2014-08-06 14:59:01 +0200
committerMark Brown <broonie@linaro.org>2014-08-16 17:14:09 -0500
commita30b95a7d81cfc3442beb5a9635f22b19c97bbfc (patch)
tree5f360c0ebd399419a05270529c2906c5dcfff9e9 /drivers/spi/spi-rspi.c
parent43937455c9bf294cffc2f25c4a4d0a1b9bbd88e6 (diff)
downloadblackbird-op-linux-a30b95a7d81cfc3442beb5a9635f22b19c97bbfc.tar.gz
blackbird-op-linux-a30b95a7d81cfc3442beb5a9635f22b19c97bbfc.zip
spi: rspi: Configure DMA slave bus width to 8 bit
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 1 byte for both directions, as that's the only supported configuration (16-bit DMA support was removed in commit 9c5de2c1754c2bb3c69c4d7bf0d0edc0a61d8232 ("spi: rspi: Remove unused 16-bit DMA support")). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-rspi.c')
-rw-r--r--drivers/spi/spi-rspi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index aa1c6a893570..6a4eb2d7f644 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -919,10 +919,13 @@ static struct dma_chan *rspi_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_1_BYTE;
+ } else {
cfg.src_addr = port_addr;
+ cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
+ }
ret = dmaengine_slave_config(chan, &cfg);
if (ret) {
OpenPOWER on IntegriCloud