0392-dmaengine-bcm2835-remove-unnecessary-masking-of-dma-.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From 54ecedafe5c0a626888e781804ee54125e4cdea9 Mon Sep 17 00:00:00 2001
  2. From: Martin Sperl <kernel@martin.sperl.org>
  3. Date: Wed, 16 Mar 2016 12:24:56 -0700
  4. Subject: [PATCH] dmaengine: bcm2835: remove unnecessary masking of dma
  5. channels
  6. The original patch contained 3 dma channels that were masked out.
  7. These - as far as research and discussions show - are a
  8. artefacts remaining from the downstream legacy dma-api.
  9. Right now down-stream still includes a legacy api used only
  10. in a single (downstream only) driver (bcm2708_fb) that requires
  11. 2D DMA for speedup (DMA-channel 0).
  12. Formerly the sd-card support driver also was using this legacy
  13. api (DMA-channel 2), but since has been moved over to use
  14. dmaengine directly.
  15. The DMA-channel 3 is already masked out in the devicetree in
  16. the default property "brcm,dma-channel-mask = <0x7f35>;"
  17. So we can remove the whole masking of DMA channels.
  18. Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
  19. Reviewed-by: Eric Anholt <eric@anholt.net>
  20. Signed-off-by: Eric Anholt <eric@anholt.net>
  21. Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  22. ---
  23. drivers/dma/bcm2835-dma.c | 9 ---------
  24. 1 file changed, 9 deletions(-)
  25. --- a/drivers/dma/bcm2835-dma.c
  26. +++ b/drivers/dma/bcm2835-dma.c
  27. @@ -123,9 +123,6 @@ struct bcm2835_desc {
  28. #define BCM2835_DMA_DATA_TYPE_S32 4
  29. #define BCM2835_DMA_DATA_TYPE_S128 16
  30. -#define BCM2835_DMA_BULK_MASK BIT(0)
  31. -#define BCM2835_DMA_FIQ_MASK (BIT(2) | BIT(3))
  32. -
  33. /* Valid only for channels 0 - 14, 15 has its own base address */
  34. #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */
  35. #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n))
  36. @@ -641,12 +638,6 @@ static int bcm2835_dma_probe(struct plat
  37. goto err_no_dma;
  38. }
  39. - /*
  40. - * Do not use the FIQ and BULK channels,
  41. - * because they are used by the GPU.
  42. - */
  43. - chans_available &= ~(BCM2835_DMA_FIQ_MASK | BCM2835_DMA_BULK_MASK);
  44. -
  45. for (i = 0; i < pdev->num_resources; i++) {
  46. irq = platform_get_irq(pdev, i);
  47. if (irq < 0)