Skip to content

Commit b540a22

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 6fefa38 commit b540a22

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
@@ -1283,6 +1283,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
12831283
goto err_no_dma;
12841284
}
12851285

1286+
#ifdef CONFIG_DMA_BCM2708
12861287
/* One channel is reserved for the legacy API */
12871288
if (chans_available & BCM2835_DMA_BULK_MASK) {
12881289
rc = bcm_dmaman_probe(pdev, base,
@@ -1293,6 +1294,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
12931294

12941295
chans_available &= ~BCM2835_DMA_BULK_MASK;
12951296
}
1297+
#endif
12961298

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

0 commit comments

Comments
 (0)