aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-09-18 13:08:51 -0400
committerMark Brown <broonie@kernel.org>2014-09-24 04:48:43 -0400
commitb41583e7299046abdc578c33f25ed83ee95b9b31 (patch)
tree2f4face49ab56651f59845972c8d07cc2059d315 /drivers/spi
parent53288fe9bdc7e8a0265bbe9074f71f1a6c478008 (diff)
spi: dw-mid: respect 8 bit mode
In case of 8 bit mode and DMA usage we end up with every second byte written as 0. We have to respect bits_per_word settings what this patch actually does. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-dw-mid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index c4b9f6497d5b..f7f0ad285ae6 100644
--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -136,7 +136,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
136 txconf.dst_addr = dws->dma_addr; 136 txconf.dst_addr = dws->dma_addr;
137 txconf.dst_maxburst = LNW_DMA_MSIZE_16; 137 txconf.dst_maxburst = LNW_DMA_MSIZE_16;
138 txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; 138 txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
139 txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; 139 txconf.dst_addr_width = dws->dma_width;
140 txconf.device_fc = false; 140 txconf.device_fc = false;
141 141
142 txchan->device->device_control(txchan, DMA_SLAVE_CONFIG, 142 txchan->device->device_control(txchan, DMA_SLAVE_CONFIG,
@@ -159,7 +159,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
159 rxconf.src_addr = dws->dma_addr; 159 rxconf.src_addr = dws->dma_addr;
160 rxconf.src_maxburst = LNW_DMA_MSIZE_16; 160 rxconf.src_maxburst = LNW_DMA_MSIZE_16;
161 rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; 161 rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
162 rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; 162 rxconf.src_addr_width = dws->dma_width;
163 rxconf.device_fc = false; 163 rxconf.device_fc = false;
164 164
165 rxchan->device->device_control(rxchan, DMA_SLAVE_CONFIG, 165 rxchan->device->device_control(rxchan, DMA_SLAVE_CONFIG,