From: Matthias Reichl Date: Sat, 10 Oct 2020 22:48:55 +0000 (+0200) Subject: bcm2835-dma: only reserve channel 0 if legacy dma driver is enabled X-Git-Tag: accepted/tizen/unified/20210330.111217~498 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddd1c8112abe97b9304702f044ffc78511c5a703;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index d1127b9..0cbfa9d 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -1283,6 +1283,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev) 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 platform_device *pdev) 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 &