Skip to content

Commit d7834fe

Browse files
HiassofTpopcornmix
authored andcommitted
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>
1 parent 5a0f034 commit d7834fe

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/dma/bcm2835-dma.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
12861286
goto err_no_dma;
12871287
}
12881288

1289+
#ifdef CONFIG_DMA_BCM2708
12891290
/* One channel is reserved for the legacy API */
12901291
if (chans_available & BCM2835_DMA_BULK_MASK) {
12911292
rc = bcm_dmaman_probe(pdev, base,
@@ -1296,6 +1297,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
12961297

12971298
chans_available &= ~BCM2835_DMA_BULK_MASK;
12981299
}
1300+
#endif
12991301

13001302
/* And possibly one for the 40-bit DMA memcpy API */
13011303
if (chans_available & od->cfg_data->chan_40bit_mask &

0 commit comments

Comments
 (0)