From: Chuan Liu <chuan.liu@amlogic.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] clk: meson: Fix glitch free mux related issues
Date: Mon, 29 Sep 2025 11:15:46 +0800 [thread overview]
Message-ID: <eee93d9d-2977-449d-8792-b2416f0c09ad@amlogic.com> (raw)
In-Reply-To: <CAFBinCCoX5+6+KQAtbhKx9KdSZhXVxS=cz8DfMVhjPX1c0iSPw@mail.gmail.com>
Hi Martin:
Thanks for the detailed explanation.
On 9/29/2025 4:55 AM, Martin Blumenstingl wrote:
> [ EXTERNAL EMAIL ]
>
> Hello,
>
> On Sun, Sep 28, 2025 at 8:41 AM Chuan Liu <chuan.liu@amlogic.com> wrote:
>>
>> On 9/28/2025 2:05 PM, Chuan Liu wrote:
>>> Hi Jerome & Martin:
>>>
>>> Sorry for the imprecise description of the glitch-free mux earlier.
>>>
>>> Recently, while troubleshooting a CPU hang issue caused by glitches,
>>> I realized there was a discrepancy from our previous understanding,
>>> so I'd like to clarify it here.
> [...]
>> An example of the clock waveform is shown below:
>>
>>
>> __ __ __ __ __ __ __ __
>> ori: ↑ |__↑ |__↑ |__↑ |__↑ |__↑ |__↑ |__↑ |__↑
>> ^
>> 1 * cycle original channel.
>> _ _ _ _ _ _ _ _ _ _ _ _
>> new: ↑ |_↑ |_↑ |_↑ |_↑ |_↑ |_↑ |_↑ |_↑ |_↑ |_↑ |_↑ |_↑
>> ^
>> 5 * cycles new channel.
>> __ __ _ _ _ _
>> out: ↑ |__↑ |______________________↑ |_↑ |_↑ |_↑ |_↑
>> ^ ^
>> start switching mux. switch to new channel.
> Thank you for the detailed report!
> This is indeed problematic behavior. I guess the result is somewhat
> random: depending on load (power draw), silicon lottery (quality),
> temperature, voltage supply, ... - one may or may not see crashes
> caused by this.
Yes, our glitch-free mux is designed to prevent glitches caused by
excessively short high or low levels in the clock output.
>
> Based on the previous discussion on this topic, my suggestion is to
> split the original patch:
> - one to add CLK_SET_RATE_GATE where needed (I think the meson8b.c
> driver already has this where needed) to actually enable the
> glitch-free mux behavior
> - another one with the CLK_OPS_PARENT_ENABLE change (meson8b.c would
> also need to be updated) to prevent the glitch-free mux from
> temporarily outputting an electrical low signal. Jerome also asked to
> document the behavior so we don't forget why we set this flag
>
> Both patches should get the proper "Fixes" tags.
> I think it would also be great if you could include the waveform
> example in at least the commit message as it helps understand the
> problem.
>
> Let's also give Jerome some time to comment before you send patches.
A V2 version was submitted later with changes based on your suggestions.
Regarding the "Fixes" tag, Jerome had proposed some modifications.
[PATCH v2 0/3] clk: Fix issues related to CLK_IGNORE_UNUSED failures and
amlogic glitch free mux - Chuan Liu via B4 Relay
<https://lore.kernel.org/all/20241111-fix_glitch_free-v2-0-0099fd9ad3e5@amlogic.com/>
Adding CLK_OPS_PARENT_ENABLE causes the CLK_IGNORE_UNUSED configuration
of it's parent clocks on the chain to become ineffective, so this patch
depends on fixing that issue before it can proceed.
Jerome and I have submitted patches to address the issue of
CLK_IGNORE_UNUSED becoming ineffective. I originally planned to wait
for progress on this patch and then incorporate Jerome's feedback before
sending the V3 version.
Hi Jerome, sorry if this caused any misunderstanding on your part; I
will provide timely feedback moving forward.
>
>
> Best regards,
> Martin
next prev parent reply other threads:[~2025-09-29 3:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-29 6:10 [PATCH 0/2] clk: Fix issues related to CLK_IGNORE_UNUSED failures and amlogic glitch free mux Chuan Liu via B4 Relay
2024-09-29 6:10 ` [PATCH 1/2] clk: Fix the CLK_IGNORE_UNUSED failure issue Chuan Liu via B4 Relay
2024-09-30 12:27 ` Jerome Brunet
2024-11-08 13:02 ` Chuan Liu
2024-09-29 6:10 ` [PATCH 2/2] clk: meson: Fix glitch free mux related issues Chuan Liu via B4 Relay
2024-09-30 12:36 ` Jerome Brunet
2024-09-30 20:08 ` Martin Blumenstingl
2024-10-08 5:44 ` Chuan Liu
2024-10-08 6:02 ` Jerome Brunet
2025-09-28 6:05 ` Chuan Liu
2025-09-28 6:40 ` Chuan Liu
2025-09-28 20:55 ` Martin Blumenstingl
2025-09-29 3:15 ` Chuan Liu [this message]
2025-09-29 12:36 ` Jerome Brunet
2025-09-30 2:07 ` Chuan Liu
2025-09-29 8:48 ` Jerome Brunet
2025-09-29 9:31 ` Chuan Liu
2025-09-29 12:55 ` Jerome Brunet
2025-09-30 2:04 ` Chuan Liu
2024-09-30 12:33 ` [PATCH 0/2] clk: Fix issues related to CLK_IGNORE_UNUSED failures and amlogic glitch free mux Jerome Brunet
2024-10-04 13:39 ` [RFC PATCH] clk: core: refine disable unused clocks Jerome Brunet
2024-11-08 7:59 ` Chuan Liu
2024-11-08 8:38 ` Jerome Brunet
2024-11-08 9:23 ` Chuan Liu
2024-11-08 9:59 ` Jerome Brunet
2024-11-08 11:49 ` Chuan Liu
2024-11-12 8:36 ` Jerome Brunet
2024-11-12 10:05 ` Chuan Liu
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=eee93d9d-2977-449d-8792-b2416f0c09ad@amlogic.com \
--to=chuan.liu@amlogic.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--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