diff options
author | Martin Sperl <kernel@martin.sperl.org> | 2016-03-16 15:24:58 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-04-15 00:27:21 -0400 |
commit | a4dcdd849ef8dbd0811ca8436aecf1c87e09686c (patch) | |
tree | 67d5e4892d17b6734bdbfcb418c83943d4ad8d0d /drivers/dma/bcm2835-dma.c | |
parent | e42685d7a7d5afa6278561ffd85c475eae246be3 (diff) |
dmaengine: bcm2835: move cyclic member from bcm2835_chan into bcm2835_desc
In preparation to consolidating code we move the cyclic member
into the bcm_2835_desc structure.
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/bcm2835-dma.c')
-rw-r--r-- | drivers/dma/bcm2835-dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index a1d851aa5b18..b3bc382fd199 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c | |||
@@ -73,7 +73,6 @@ struct bcm2835_chan { | |||
73 | struct list_head node; | 73 | struct list_head node; |
74 | 74 | ||
75 | struct dma_slave_config cfg; | 75 | struct dma_slave_config cfg; |
76 | bool cyclic; | ||
77 | unsigned int dreq; | 76 | unsigned int dreq; |
78 | 77 | ||
79 | int ch; | 78 | int ch; |
@@ -93,6 +92,8 @@ struct bcm2835_desc { | |||
93 | 92 | ||
94 | unsigned int frames; | 93 | unsigned int frames; |
95 | size_t size; | 94 | size_t size; |
95 | |||
96 | bool cyclic; | ||
96 | }; | 97 | }; |
97 | 98 | ||
98 | #define BCM2835_DMA_CS 0x00 | 99 | #define BCM2835_DMA_CS 0x00 |
@@ -377,8 +378,6 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) | |||
377 | struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); | 378 | struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); |
378 | unsigned long flags; | 379 | unsigned long flags; |
379 | 380 | ||
380 | c->cyclic = true; /* Nothing else is implemented */ | ||
381 | |||
382 | spin_lock_irqsave(&c->vc.lock, flags); | 381 | spin_lock_irqsave(&c->vc.lock, flags); |
383 | if (vchan_issue_pending(&c->vc) && !c->desc) | 382 | if (vchan_issue_pending(&c->vc) && !c->desc) |
384 | bcm2835_dma_start_desc(c); | 383 | bcm2835_dma_start_desc(c); |
@@ -432,6 +431,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( | |||
432 | d->c = c; | 431 | d->c = c; |
433 | d->dir = direction; | 432 | d->dir = direction; |
434 | d->frames = buf_len / period_len; | 433 | d->frames = buf_len / period_len; |
434 | d->cyclic = true; | ||
435 | 435 | ||
436 | d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); | 436 | d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); |
437 | if (!d->cb_list) { | 437 | if (!d->cb_list) { |