From: Brian Masney <bmasney@redhat.com>
To: "Ng, Adrian Ho Yin" <adrian.ho.yin.ng@altera.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: Re: [PATCH 1/3] clk: socfpga: agilex: convert to CLK_OF_DECLARE()
Date: Mon, 21 Sep 2026 10:52:49 -0400 [thread overview]
Message-ID: <arFEwdu6EucK1G9x@redhat.com> (raw)
In-Reply-To: <1abffb74-3b9d-494d-a414-ea21d537ed74@altera.com>
+ Bartosz
Hi Adrian,
On Mon, Sep 21, 2026 at 11:17:13AM +0800, Ng, Adrian Ho Yin wrote:
> subsys_initcall() / subsys_platform_driver() would not fix the failure we
> are hitting. Both still run after time_init(), while the DW APB timer is
> registered via TIMER_OF_DECLARE from timer_probe().
>
> So moving from core_initcall() to subsys_initcall() changes nothing for
> this consumer: the timer cannot defer, clk_get() still fails, and the timer
> is never brought up. That is why these patches use CLK_OF_DECLARE(): the
> provider must be registered from of_clk_init() so clocks exist before
> TIMER_OF_DECLARE runs.
>
> On the broader point about CLK_OF_DECLARE abuse: I agree it should not be
> used merely to beat platform device probe. If the preferred approach is to
> keep the clkmgr as a platform driver (subsys_platform_driver()) and give the
> DW APB timer nodes a fixed clock-frequency instead of a clocks phandle, I
> can respin that way. Please let me know which you prefer.
I wanted confirmation that you wanted to use CLK_OF_DECLARE() for the
system timers.
Will you by chance be at Linux Plumbers Conference in two weeks? Bartosz
is leading a discussion about the future of CLK_OF_DECLARE() and
friends.
https://lpc.events/event/20/contributions/2503/
We want to minimize the use of CLK_OF_DECLARE(), so the preference is
to keep this as a platform driver if possible. If you are able to get
around using CLK_OF_DECLARE() by initially running the system timers
with a fixed frequency then I think that would be preferable.
Brian
next prev parent reply other threads:[~2026-09-21 14:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 7:01 [PATCH 0/3] clk: socfpga: convert clock managers to CLK_OF_DECLARE() adrian.ho.yin.ng
2026-09-11 7:01 ` [PATCH 1/3] clk: socfpga: agilex: convert " adrian.ho.yin.ng
2026-09-18 22:42 ` Brian Masney
2026-09-21 3:17 ` Ng, Adrian Ho Yin
2026-09-21 14:52 ` Brian Masney [this message]
2026-09-21 16:59 ` Dinh Nguyen
2026-09-21 19:57 ` Brian Masney
2026-09-25 9:34 ` Jerome Brunet
2026-09-25 15:02 ` Dinh Nguyen
2026-09-11 7:01 ` [PATCH 2/3] clk: socfpga: agilex5: " adrian.ho.yin.ng
2026-09-11 7:01 ` [PATCH 3/3] clk: socfpga: stratix10: " adrian.ho.yin.ng
2026-09-18 16:56 ` [PATCH 0/3] clk: socfpga: convert clock managers " Dinh Nguyen
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=arFEwdu6EucK1G9x@redhat.com \
--to=bmasney@redhat.com \
--cc=adrian.ho.yin.ng@altera.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=dinguyen@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.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 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.