72064bc92d4283f5c854115e4dc21ead92973ad2
[openwrt/staging/ldir.git] /
1 From 124d503cd4c6f5a7a877226c26139ec82c7d1282 Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Sun, 11 Oct 2020 00:48:55 +0200
4 Subject: [PATCH] bcm2835-dma: only reserve channel 0 if legacy dma
5 driver is enabled
6
7 If CONFIG_DMA_BCM2708 isn't enabled there's no need to mask out
8 one of the already scarce DMA channels.
9
10 Signed-off-by: Matthias Reichl <hias@horus.com>
11 ---
12 drivers/dma/bcm2835-dma.c | 2 ++
13 1 file changed, 2 insertions(+)
14
15 --- a/drivers/dma/bcm2835-dma.c
16 +++ b/drivers/dma/bcm2835-dma.c
17 @@ -1283,6 +1283,7 @@ static int bcm2835_dma_probe(struct plat
18 goto err_no_dma;
19 }
20
21 +#ifdef CONFIG_DMA_BCM2708
22 /* One channel is reserved for the legacy API */
23 if (chans_available & BCM2835_DMA_BULK_MASK) {
24 rc = bcm_dmaman_probe(pdev, base,
25 @@ -1293,6 +1294,7 @@ static int bcm2835_dma_probe(struct plat
26
27 chans_available &= ~BCM2835_DMA_BULK_MASK;
28 }
29 +#endif
30
31 /* And possibly one for the 40-bit DMA memcpy API */
32 if (chans_available & od->cfg_data->chan_40bit_mask &