[PATCH v4 07/28] dmaengine: bcm2835: Support common dma-channel-mask

Frank Li Frank.li at oss.nxp.com
Wed Dec 2 18:47:27 PST 2026


On Fri, Nov 27, 2026 at 01:21:57PM +0100, Andrea della Porta wrote:
> Nowadays there is a generic property for dma-channel-mask in the DMA
> controller binding. So prefer this one instead of the old vendor specific
> one. Print a warning in case the old one is used. Btw use the result of
> of_property_read_u32() as return code in error case.
>
> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
> Signed-off-by: Andrea della Porta <andrea.porta at suse.com>
> ---

Reviewed-by: Frank Li <Frank.Li at nxp.com>

>  drivers/dma/bcm2835-dma.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
> index d65a93be5fa1..d2e000e94347 100644
> --- a/drivers/dma/bcm2835-dma.c
> +++ b/drivers/dma/bcm2835-dma.c
> @@ -982,12 +982,20 @@ 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;
> +	rc = of_property_read_u32(pdev->dev.of_node, "dma-channel-mask",
> +				  &chans_available);
> +
> +	if (rc) {
> +		/* Try deprecated property */
> +		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");
> +			goto err_no_dma;
> +		}
> +
> +		dev_warn(&pdev->dev,
> +			 "Please update the DT, replacing brcm,dma-channel-mask with dma-channel-mask\n");
>  	}
>
>  	/* get irqs for each channel that we support */
> --
> 2.51.0
>



More information about the linux-arm-kernel mailing list