brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0395-dmaengine-bcm2835-move-cyclic-member-from-bcm2835_ch.patch
1 From 45a5aa455ea243c3daf0d1bdbfdb83787ae95249 Mon Sep 17 00:00:00 2001
2 From: Martin Sperl <kernel@martin.sperl.org>
3 Date: Wed, 16 Mar 2016 12:24:58 -0700
4 Subject: [PATCH] dmaengine: bcm2835: move cyclic member from bcm2835_chan into
5 bcm2835_desc
6
7 In preparation to consolidating code we move the cyclic member
8 into the bcm_2835_desc structure.
9
10 Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
11 Reviewed-by: Eric Anholt <eric@anholt.net>
12 Signed-off-by: Eric Anholt <eric@anholt.net>
13 Signed-off-by: Vinod Koul <vinod.koul@intel.com>
14 ---
15 drivers/dma/bcm2835-dma.c | 6 +++---
16 1 file changed, 3 insertions(+), 3 deletions(-)
17
18 --- a/drivers/dma/bcm2835-dma.c
19 +++ b/drivers/dma/bcm2835-dma.c
20 @@ -73,7 +73,6 @@ struct bcm2835_chan {
21 struct list_head node;
22
23 struct dma_slave_config cfg;
24 - bool cyclic;
25 unsigned int dreq;
26
27 int ch;
28 @@ -93,6 +92,8 @@ struct bcm2835_desc {
29
30 unsigned int frames;
31 size_t size;
32 +
33 + bool cyclic;
34 };
35
36 #define BCM2835_DMA_CS 0x00
37 @@ -377,8 +378,6 @@ static void bcm2835_dma_issue_pending(st
38 struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
39 unsigned long flags;
40
41 - c->cyclic = true; /* Nothing else is implemented */
42 -
43 spin_lock_irqsave(&c->vc.lock, flags);
44 if (vchan_issue_pending(&c->vc) && !c->desc)
45 bcm2835_dma_start_desc(c);
46 @@ -432,6 +431,7 @@ static struct dma_async_tx_descriptor *b
47 d->c = c;
48 d->dir = direction;
49 d->frames = buf_len / period_len;
50 + d->cyclic = true;
51
52 d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL);
53 if (!d->cb_list) {