]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.7/spi-dw-mid-respect-8-bit-mode.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.7 / spi-dw-mid-respect-8-bit-mode.patch
1 From b41583e7299046abdc578c33f25ed83ee95b9b31 Mon Sep 17 00:00:00 2001
2 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3 Date: Thu, 18 Sep 2014 20:08:51 +0300
4 Subject: spi: dw-mid: respect 8 bit mode
5
6 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7
8 commit b41583e7299046abdc578c33f25ed83ee95b9b31 upstream.
9
10 In case of 8 bit mode and DMA usage we end up with every second byte written as
11 0. We have to respect bits_per_word settings what this patch actually does.
12
13 Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
14 Signed-off-by: Mark Brown <broonie@kernel.org>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16
17 ---
18 drivers/spi/spi-dw-mid.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 --- a/drivers/spi/spi-dw-mid.c
22 +++ b/drivers/spi/spi-dw-mid.c
23 @@ -136,7 +136,7 @@ static int mid_spi_dma_transfer(struct d
24 txconf.dst_addr = dws->dma_addr;
25 txconf.dst_maxburst = LNW_DMA_MSIZE_16;
26 txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
27 - txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
28 + txconf.dst_addr_width = dws->dma_width;
29 txconf.device_fc = false;
30
31 txchan->device->device_control(txchan, DMA_SLAVE_CONFIG,
32 @@ -159,7 +159,7 @@ static int mid_spi_dma_transfer(struct d
33 rxconf.src_addr = dws->dma_addr;
34 rxconf.src_maxburst = LNW_DMA_MSIZE_16;
35 rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
36 - rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
37 + rxconf.src_addr_width = dws->dma_width;
38 rxconf.device_fc = false;
39
40 rxchan->device->device_control(rxchan, DMA_SLAVE_CONFIG,