1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/bcm27xx/patches-5.15/950-0305-bcm2835-dma-only-reserve-channel-0-if-legacy-dma-dri.patch

33 lines
1,021 B
Diff
Raw Normal View History

2022-04-22 15:00:47 +00:00
From f35c1df0c35d8763cde90d562b9f07722578c0cb Mon Sep 17 00:00:00 2001
2021-11-24 17:32:01 +00:00
From: Matthias Reichl <hias@horus.com>
Date: Sun, 11 Oct 2020 00:48:55 +0200
2022-04-22 15:00:47 +00:00
Subject: [PATCH 305/828] bcm2835-dma: only reserve channel 0 if legacy dma
2021-11-24 17:32:01 +00:00
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
2022-04-22 15:00:47 +00:00
@@ -1283,6 +1283,7 @@ static int bcm2835_dma_probe(struct plat
2021-11-24 17:32:01 +00:00
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,
2022-04-22 15:00:47 +00:00
@@ -1293,6 +1294,7 @@ static int bcm2835_dma_probe(struct plat
2021-11-24 17:32:01 +00:00
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 &