From: Frank Li <Frank.li@oss.nxp.com>
To: Jiawen Liu <1298662399@qq.com>
Cc: Frank Li <Frank.Li@nxp.com>, Vinod Koul <vkoul@kernel.org>,
imx@lists.linux.dev, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: fsl-edma: avoid double-disable of channel clocks
Date: Mon, 30 Nov 2026 14:40:40 -0600 [thread overview]
Message-ID: <aw3fSCXVG5awt-nm@SMW015318> (raw)
In-Reply-To: <tencent_24E5EB338AE8217D74299CA400017E9D2A09@qq.com>
On Sun, Nov 29, 2026 at 04:27:15PM +0400, Jiawen Liu 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>
> ---
I hope use Joy's patch
https://patchwork.kernel.org/project/linux-dmaengine/patch/20261125-b4-edma-runtime-opt-mo-v8-1-81345a3bfb52@oss.nxp.com/
to fix these propblem
Frank
> 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");
> }
> fsl_chan->pdev = pdev;
> vchan_init(&fsl_chan->vchan, &fsl_edma->dma_dev);
> --
> 2.34.1
>
>
prev parent reply other threads:[~2026-11-30 20:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 12:27 [PATCH] dmaengine: fsl-edma: avoid double-disable of channel clocks Jiawen Liu
2026-11-30 2:54 ` Peng Fan (OSS)
2026-11-30 20:40 ` Frank Li [this message]
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=aw3fSCXVG5awt-nm@SMW015318 \
--to=frank.li@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.