Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1359247
| From | Eric Anholt <eric@anholt.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/8] dmaengine: bcm2835: move cyclic member from bcm2835_chan into bcm2835_desc |
| Date | 2016-03-16 20:30 +0100 |
| Message-ID | <rdpiP-4Or-31@gated-at.bofh.it> (permalink) |
| References | <rdpiO-4Or-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Martin Sperl <kernel@martin.sperl.org>
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>
---
drivers/dma/bcm2835-dma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
index a1d851a..b3bc382 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -73,7 +73,6 @@ struct bcm2835_chan {
struct list_head node;
struct dma_slave_config cfg;
- bool cyclic;
unsigned int dreq;
int ch;
@@ -93,6 +92,8 @@ struct bcm2835_desc {
unsigned int frames;
size_t size;
+
+ bool cyclic;
};
#define BCM2835_DMA_CS 0x00
@@ -377,8 +378,6 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan)
struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
unsigned long flags;
- c->cyclic = true; /* Nothing else is implemented */
-
spin_lock_irqsave(&c->vc.lock, flags);
if (vchan_issue_pending(&c->vc) && !c->desc)
bcm2835_dma_start_desc(c);
@@ -432,6 +431,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic(
d->c = c;
d->dir = direction;
d->frames = buf_len / period_len;
+ d->cyclic = true;
d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL);
if (!d->cb_list) {
--
2.7.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8 v4] bcm2835 DMA slave support Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 [PATCH 5/8] dmaengine: bcm2835: move controlblock chain generation into separate method Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 [PATCH 6/8] dmaengine: bcm2835: limit max length based on channel type Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 [PATCH 8/8] dmaengine: bcm2835: add dma_memcopy support to bcm2835-dma Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 [PATCH 1/8] dmaengine: bcm2835: set residue_granularity field Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 [PATCH 7/8] dmaengine: bcm2835: add slave_sg support to bcm2835-dma Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 [PATCH 4/8] dmaengine: bcm2835: move cyclic member from bcm2835_chan into bcm2835_desc Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 [PATCH 2/8] dmaengine: bcm2835: remove unnecessary masking of dma channels Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 [PATCH 3/8] dmaengine: bcm2835: add additional defines for DMA-registers Eric Anholt <eric@anholt.net> - 2016-03-16 20:30 +0100 Re: [PATCH 0/8 v4] bcm2835 DMA slave support Martin Sperl <martin@sperl.org> - 2016-03-17 11:30 +0100 Re: [PATCH 0/8 v4] bcm2835 DMA slave support Martin Sperl <kernel@martin.sperl.org> - 2016-03-17 14:20 +0100
csiph-web