All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@oss.nxp.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	patches@lists.linux.dev,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	Mark Brown <broonie@kernel.org>,
	Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
	Brian Masney <bmasney@redhat.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Chen-Yu Tsai <wenst@chromium.org>
Subject: Re: [PATCH] Revert "clk: Respect CLK_OPS_PARENT_ENABLE during recalc"
Date: Tue, 3 Feb 2026 10:57:10 +0800	[thread overview]
Message-ID: <aYFkBrMthr0RfkhA@shlinux89> (raw)
In-Reply-To: <20260203002439.1223213-1-sboyd@kernel.org>

On Mon, Feb 02, 2026 at 04:24:38PM -0800, Stephen Boyd wrote:
>This reverts commit 669917676e93fca5ea3c66fc9539830312bec58e.
>It's been shown to cause problems on i.MX and STM32 platforms
>where the board doesn't boot. In one case, a clk with
>CLK_IS_CRITICAL and CLK_OPS_PARENT_ENABLE is being registered
>causing the parent to be enabled, the rate recalculated, and then
>the parent is disabled causing the critical clk being registered
>to stop clocking.
>
>A fix for that would be to calculate the rate of the clk after
>enabling the critical clk itself, but that wouldn't fix another
>problem where a clk with CLK_OPS_PARENT_ENABLE is registered
>before the parent is registered. In this case the hardware access
>in the clk_ops::recalc_rate() function would fail if the parent
>is disabled.
>
>There are even more problems exposed by this patch because it
>introduces logic that disables clks earlier in system boot than
>has existed previously. Historically we've not disabled clks
>until late init (clk_disable_unused) under the assumption that
>clks have been registered enough to have a consistent view of the
>clk tree. The clk_disable_unused logic doesn't work very well
>though, leading to quite a few devices booting with
>clk_ignore_unused on the kernel command line.
>
>Long story short, disabling clks during clk registration is full
>of pitfalls. Revert this commit until a proper solution can be
>found.
>
>Reported-by: Alexander Stein <alexander.stein@ew.tq-group.com>
>Closes: https://lore.kernel.org/r/6239343.lOV4Wx5bFT@steina-w
>Reported-by: Mark Brown <broonie@kernel.org>
>Closes: https://lore.kernel.org/r/036da7ce-6487-4a6e-9b15-97c6d3bcdcec@sirena.org.uk
>Cc: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
>Cc: Brian Masney <bmasney@redhat.com>
>Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>Cc: Chen-Yu Tsai <wenst@chromium.org>
>Signed-off-by: Stephen Boyd <sboyd@kernel.org>

Tested-by: Peng Fan <peng.fan@nxp.com>

  reply	other threads:[~2026-02-03  2:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03  0:24 [PATCH] Revert "clk: Respect CLK_OPS_PARENT_ENABLE during recalc" Stephen Boyd
2026-02-03  2:57 ` Peng Fan [this message]
2026-02-03  7:32 ` Alexander Stein
2026-02-03 15:15 ` Brian Masney
2026-02-03 17:43 ` Mark Brown
2026-02-05 11:43 ` AngeloGioacchino Del Regno

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=aYFkBrMthr0RfkhA@shlinux89 \
    --to=peng.fan@oss.nxp.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bmasney@redhat.com \
    --cc=broonie@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nicolas.frattaroli@collabora.com \
    --cc=patches@lists.linux.dev \
    --cc=sboyd@kernel.org \
    --cc=wenst@chromium.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.