Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Vinod Koul <vkoul@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Jiada Wang <jiada_wang@mentor.com>,
	dmaengine@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/11] dmaengine: imx-sdma: drop legacy device_node np check
Date: Wed, 3 Sep 2025 10:48:59 -0400	[thread overview]
Message-ID: <aLhVW2xkjer5SEkZ@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20250903-v6-16-topic-sdma-v1-1-ac7bab629e8b@pengutronix.de>

On Wed, Sep 03, 2025 at 03:06:09PM +0200, Marco Felsch wrote:
> The legacy 'if (np)' was required in past where we had pdata and dt.
> Nowadays the driver binds only to dt platforms. So using a new kernel
> but still use pdata is not possible, therefore we can drop the legacy
> 'if' code path.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

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

> ---
>  drivers/dma/imx-sdma.c | 32 ++++++++++++++------------------
>  1 file changed, 14 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 02a85d6f1bea2df7d355858094c0c0b0bd07148e..89b4b1266726a9c8a552dc48670825ae00717e1c 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -2325,11 +2325,9 @@ static int sdma_probe(struct platform_device *pdev)
>  			vchan_init(&sdmac->vc, &sdma->dma_device);
>  	}
>
> -	if (np) {
> -		sdma->iram_pool = of_gen_pool_get(np, "iram", 0);
> -		if (sdma->iram_pool)
> -			dev_info(&pdev->dev, "alloc bd from iram.\n");
> -	}
> +	sdma->iram_pool = of_gen_pool_get(np, "iram", 0);
> +	if (sdma->iram_pool)
> +		dev_info(&pdev->dev, "alloc bd from iram.\n");
>
>  	ret = sdma_init(sdma);
>  	if (ret)
> @@ -2369,21 +2367,19 @@ static int sdma_probe(struct platform_device *pdev)
>  		goto err_init;
>  	}
>
> -	if (np) {
> -		ret = of_dma_controller_register(np, sdma_xlate, sdma);
> -		if (ret) {
> -			dev_err(&pdev->dev, "failed to register controller\n");
> -			goto err_register;
> -		}
> +	ret = of_dma_controller_register(np, sdma_xlate, sdma);
> +	if (ret) {
> +		dev_err(&pdev->dev, "failed to register controller\n");
> +		goto err_register;
> +	}
>
> -		spba_bus = of_find_compatible_node(NULL, NULL, "fsl,spba-bus");
> -		ret = of_address_to_resource(spba_bus, 0, &spba_res);
> -		if (!ret) {
> -			sdma->spba_start_addr = spba_res.start;
> -			sdma->spba_end_addr = spba_res.end;
> -		}
> -		of_node_put(spba_bus);
> +	spba_bus = of_find_compatible_node(NULL, NULL, "fsl,spba-bus");
> +	ret = of_address_to_resource(spba_bus, 0, &spba_res);
> +	if (!ret) {
> +		sdma->spba_start_addr = spba_res.start;
> +		sdma->spba_end_addr = spba_res.end;
>  	}
> +	of_node_put(spba_bus);
>
>  	/*
>  	 * Because that device tree does not encode ROM script address,
>
> --
> 2.47.2
>


  reply	other threads:[~2025-09-03 19:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 13:06 [PATCH 00/11] i.MX SDMA cleanups and fixes Marco Felsch
2025-09-03 13:06 ` [PATCH 01/11] dmaengine: imx-sdma: drop legacy device_node np check Marco Felsch
2025-09-03 14:48   ` Frank Li [this message]
2025-09-03 13:06 ` [PATCH 02/11] dmaengine: imx-sdma: sdma_remove minor cleanups Marco Felsch
2025-09-03 14:50   ` Frank Li
2025-09-03 13:06 ` [PATCH 03/11] dmaengine: imx-sdma: cosmetic cleanup Marco Felsch
2025-09-03 14:55   ` Frank Li
2025-09-03 13:06 ` [PATCH 04/11] dmaengine: imx-sdma: make use of devm_kzalloc for script_addrs Marco Felsch
2025-09-03 15:00   ` Frank Li
2025-09-03 13:06 ` [PATCH 05/11] dmaengine: imx-sdma: make use of devm_clk_get_prepared() Marco Felsch
2025-09-03 15:01   ` Frank Li
2025-09-03 13:06 ` [PATCH 06/11] dmaengine: imx-sdma: make use of devm_add_action_or_reset to unregiser the dma_device Marco Felsch
2025-09-03 14:53   ` Frank Li
2025-09-10 10:13     ` Marco Felsch
2025-09-03 13:06 ` [PATCH 07/11] dmaengine: imx-sdma: make use of dev_err_probe() Marco Felsch
2025-09-03 15:04   ` Frank Li
2025-09-10 12:05     ` Marco Felsch
2025-09-03 13:06 ` [PATCH 08/11] dmaengine: imx-sdma: fix missing of_dma_controller_free() Marco Felsch
2025-09-03 15:08   ` Frank Li
2025-09-10  9:45     ` Marco Felsch
2025-09-03 13:06 ` [PATCH 09/11] dmaengine: add support for device_link Marco Felsch
2025-09-03 14:46   ` Frank Li
2025-09-09 12:03     ` Marco Felsch
2025-09-09 14:42       ` Frank Li
2025-09-10  9:34         ` Marco Felsch
2025-09-10 15:51           ` Frank Li
2025-09-10 19:35         ` Marco Felsch
2025-09-10 21:41           ` Frank Li
2025-09-11 11:50             ` Marco Felsch
2025-09-11 15:18               ` Frank Li
2025-09-11 19:23                 ` Marco Felsch
2025-09-03 13:06 ` [PATCH 10/11] dmaengine: imx-sdma: drop remove callback Marco Felsch
2025-09-03 15:15   ` Frank Li
2025-09-03 13:06 ` [PATCH 11/11] dmaengine: imx-sdma: fix spba-bus handling for i.MX8M Marco Felsch
2025-09-04  4:31   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aLhVW2xkjer5SEkZ@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jiada_wang@mentor.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox