From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: Jiawen Liu <1298662399@qq.com>
Cc: Peng Fan <peng.fan@oss.nxp.com>, Frank Li <Frank.Li@nxp.com>,
Vinod Koul <vkoul@kernel.org>,
imx@lists.linux.dev, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH] dmaengine: fsl-edma: avoid double-disable of channel clocks
Date: Mon, 30 Nov 2026 10:54:33 +0800 [thread overview]
Message-ID: <20261130025434.109278-1-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <tencent_24E5EB338AE8217D74299CA400017E9D2A09@qq.com>
On Sun, 29 Nov 2026 16:27:15 +0400 Jiawen Liu <1298662399@qq.com> wrote:
> devm_clk_get_enabled() registers automatic clock cleanup for each
> i.MX8ULP eDMA channel. The probe also manually disables the clock after
> channel initialization, so devres teardown executes disable and
> unprepare for the same enable a second time.
>
> Obtain the clock with devm_clk_get(), enable it explicitly for channel
> initialization, and retain the existing manual disable. Propagate an
> enable failure before touching the channel registers.
>
> Fixes: d8d4355861d8 ("dmaengine: fsl-edma: add i.MX8ULP edma support")
> Signed-off-by: Jiawen Liu <1298662399@qq.com>
> ---
> drivers/dma/fsl-edma-main.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
> index da51399114884..ecbd5b597d8d9 100644
> --- a/drivers/dma/fsl-edma-main.c
> +++ b/drivers/dma/fsl-edma-main.c
> @@ -815,11 +815,15 @@ static int fsl_edma_probe(struct platform_device *pdev)
>
> if (drvdata->flags & FSL_EDMA_DRV_HAS_CHCLK) {
> snprintf(clk_name, sizeof(clk_name), "ch%02d", i);
> - fsl_chan->clk = devm_clk_get_enabled(&pdev->dev,
> - (const char *)clk_name);
> + fsl_chan->clk = devm_clk_get(&pdev->dev, clk_name);
>
> if (IS_ERR(fsl_chan->clk))
> return PTR_ERR(fsl_chan->clk);
> +
> + ret = clk_prepare_enable(fsl_chan->clk);
> + if (ret)
> + return dev_err_probe(&pdev->dev, ret,
> + "Failed to enable channel clock\n");
Reviewed-by: Peng Fan <peng.fan@nxp.com>
next prev parent reply other threads:[~2026-11-30 2:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 12:27 Jiawen Liu
2026-11-30 2:54 ` Peng Fan (OSS) [this message]
2026-11-30 20:40 ` Frank Li
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=20261130025434.109278-1-peng.fan@oss.nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=1298662399@qq.com \
--cc=Frank.Li@nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--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
all inboxes | Powered by JetHome®