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