0394-dmaengine-bcm2835-move-cyclic-member-from-bcm2835_ch.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 1a9dffc1772e2c6be450149fe1a0114a778132ef 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. In preparation to consolidating code we move the cyclic member
  7. into the bcm_2835_desc structure.
  8. Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
  9. Reviewed-by: Eric Anholt <eric@anholt.net>
  10. Signed-off-by: Eric Anholt <eric@anholt.net>
  11. Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  12. ---
  13. drivers/dma/bcm2835-dma.c | 6 +++---
  14. 1 file changed, 3 insertions(+), 3 deletions(-)
  15. --- a/drivers/dma/bcm2835-dma.c
  16. +++ b/drivers/dma/bcm2835-dma.c
  17. @@ -73,7 +73,6 @@ struct bcm2835_chan {
  18. struct list_head node;
  19. struct dma_slave_config cfg;
  20. - bool cyclic;
  21. unsigned int dreq;
  22. int ch;
  23. @@ -93,6 +92,8 @@ struct bcm2835_desc {
  24. unsigned int frames;
  25. size_t size;
  26. +
  27. + bool cyclic;
  28. };
  29. #define BCM2835_DMA_CS 0x00
  30. @@ -377,8 +378,6 @@ static void bcm2835_dma_issue_pending(st
  31. struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
  32. unsigned long flags;
  33. - c->cyclic = true; /* Nothing else is implemented */
  34. -
  35. spin_lock_irqsave(&c->vc.lock, flags);
  36. if (vchan_issue_pending(&c->vc) && !c->desc)
  37. bcm2835_dma_start_desc(c);
  38. @@ -432,6 +431,7 @@ static struct dma_async_tx_descriptor *b
  39. d->c = c;
  40. d->dir = direction;
  41. d->frames = buf_len / period_len;
  42. + d->cyclic = true;
  43. d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL);
  44. if (!d->cb_list) {