@@ -941,12 +941,18 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
}
/* Request DMA channel mask from device tree */
- if (of_property_read_u32(pdev->dev.of_node,
- "brcm,dma-channel-mask",
- &chans_available)) {
- dev_err(&pdev->dev, "Failed to get channel mask\n");
- rc = -EINVAL;
- goto err_no_dma;
+ if (of_property_read_u32(pdev->dev.of_node, "dma-channel-mask",
+ &chans_available)) {
+ if (of_property_read_u32(pdev->dev.of_node,
+ "brcm,dma-channel-mask",
+ &chans_available)) {
+ dev_err(&pdev->dev, "Failed to get channel mask\n");
+ rc = -EINVAL;
+ goto err_no_dma;
+ } else {
+ dev_warn(&pdev->dev,
+ "brcm,dma-channel-mask is deprecated, update your device-tree\n");
+ }
}
/* get irqs for each channel that we support */
Since commit e2d896c08ca3 ("Documentation: bindings: dma: Add binding for dma-channel-mask") there is a generic property to list available DMA channels for the kernel to use. The generic property has been implemented by some other platforms. So implement support for the generic one and consider the vendor specific one as deprecated. This also simplifies the YAML conversion of the BCM2835 DMA DT bindings a little bit. Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> --- drivers/dma/bcm2835-dma.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)