openwrt/target/linux/bcm27xx/patches-5.15/950-0301-bcm2835-dma-only-reserve-channel-0-if-legacy-dma-dri.patch
Álvaro Fernández Rojas 20ea6adbf1 bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-17 15:11:22 +02:00

33 lines
1013 B
Diff

From 89036f62b573bc2df30e7b865da65454213f6720 Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Sun, 11 Oct 2020 00:48:55 +0200
Subject: [PATCH] bcm2835-dma: only reserve channel 0 if legacy dma
driver is enabled
If CONFIG_DMA_BCM2708 isn't enabled there's no need to mask out
one of the already scarce DMA channels.
Signed-off-by: Matthias Reichl <hias@horus.com>
---
drivers/dma/bcm2835-dma.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -1283,6 +1283,7 @@ static int bcm2835_dma_probe(struct plat
goto err_no_dma;
}
+#ifdef CONFIG_DMA_BCM2708
/* One channel is reserved for the legacy API */
if (chans_available & BCM2835_DMA_BULK_MASK) {
rc = bcm_dmaman_probe(pdev, base,
@@ -1293,6 +1294,7 @@ static int bcm2835_dma_probe(struct plat
chans_available &= ~BCM2835_DMA_BULK_MASK;
}
+#endif
/* And possibly one for the 40-bit DMA memcpy API */
if (chans_available & od->cfg_data->chan_40bit_mask &