From: Frank Li <Frank.li@oss.nxp.com>
To: Linkai Gong <gonglinkai@kylinos.cn>
Cc: Abel Vesa <abelvesa@kernel.org>, Peng Fan <peng.fan@nxp.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-clk@vger.kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v2] clk: imx: composite-93: return timeout from gate enable
Date: Thu, 10 Sep 2026 10:47:20 -0500 [thread overview]
Message-ID: <aqLRCHFEbyUnSCEG@SMW015318> (raw)
In-Reply-To: <20260907022214.1076402-1-gonglinkai@kylinos.cn>
On Mon, Sep 07, 2026 at 10:22:14AM +0800, Linkai Gong wrote:
> [You don't often get email from gonglinkai@kylinos.cn. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> imx93_clk_composite_wait_ready() already reports a busy timeout, but
> imx93_clk_composite_gate_enable() ignores that and always returns 0.
> The clk framework then marks the clock enabled and lets consumers run
> while the CCM slice is still busy.
>
> Propagate the timeout so enable fails instead of looking successful.
>
> Fixes: 4a3de5aa7743 ("clk: imx: clk-composite-93: check slice busy")
> Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
> ---
> v2:
> - Rewrite the commit message to explain why (Abel Vesa)
Don't post to v1's thread.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> drivers/clk/imx/clk-composite-93.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/clk/imx/clk-composite-93.c b/drivers/clk/imx/clk-composite-93.c
> index ef20ceb2d255..953f67d13978 100644
> --- a/drivers/clk/imx/clk-composite-93.c
> +++ b/drivers/clk/imx/clk-composite-93.c
> @@ -43,11 +43,12 @@ static int imx93_clk_composite_wait_ready(struct clk_hw *hw, void __iomem *reg)
> return ret;
> }
>
> -static void imx93_clk_composite_gate_endisable(struct clk_hw *hw, int enable)
> +static int imx93_clk_composite_gate_endisable(struct clk_hw *hw, int enable)
> {
> struct clk_gate *gate = to_clk_gate(hw);
> unsigned long flags;
> u32 reg;
> + int ret;
>
> if (gate->lock)
> spin_lock_irqsave(gate->lock, flags);
> @@ -61,17 +62,17 @@ static void imx93_clk_composite_gate_endisable(struct clk_hw *hw, int enable)
>
> writel(reg, gate->reg);
>
> - imx93_clk_composite_wait_ready(hw, gate->reg);
> + ret = imx93_clk_composite_wait_ready(hw, gate->reg);
>
> if (gate->lock)
> spin_unlock_irqrestore(gate->lock, flags);
> +
> + return ret;
> }
>
> static int imx93_clk_composite_gate_enable(struct clk_hw *hw)
> {
> - imx93_clk_composite_gate_endisable(hw, 1);
> -
> - return 0;
> + return imx93_clk_composite_gate_endisable(hw, 1);
> }
>
> static void imx93_clk_composite_gate_disable(struct clk_hw *hw)
> --
> 2.25.1
>
next prev parent reply other threads:[~2026-09-10 15:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 8:56 [PATCH] clk: imx: composite-93: return timeout from gate enable Linkai Gong
2026-08-21 11:49 ` Abel Vesa
2026-09-07 2:19 ` Linkai Gong
2026-09-02 8:19 ` Peng Fan
2026-09-07 2:20 ` Linkai Gong
2026-09-07 2:22 ` [PATCH v2] " Linkai Gong
2026-09-10 10:49 ` Peng Fan (OSS)
2026-09-10 15:47 ` Frank Li [this message]
2026-09-10 15:45 ` [PATCH] " 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=aqLRCHFEbyUnSCEG@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=abelvesa@kernel.org \
--cc=gonglinkai@kylinos.cn \
--cc=imx@lists.linux.dev \
--cc=linux-clk@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=sboyd@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