From: Dinh Nguyen <dinguyen@kernel.org>
To: Brian Masney <bmasney@redhat.com>,
"Ng, Adrian Ho Yin" <adrian.ho.yin.ng@altera.com>
Cc: 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 11:59:50 -0500 [thread overview]
Message-ID: <c89f566b-9fd7-4824-ad19-bd8b055d2736@kernel.org> (raw)
In-Reply-To: <arFEwdu6EucK1G9x@redhat.com>
Hi Brian,
On 9/21/26 09:52, Brian Masney wrote:
> + 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.
I originally pushed back on hard-coding a fixed frequency for these
timers because if the bootloader changed the frequency of the clocks for
these timers, we may run in to a problem. But I don't think the
bootloader had changed the clock frequency in a long time, so it may not
really be a problem. But it just feels wrong to not take in a frequency
from the clock driver.
The other option is perhaps adding the ability to defer probe these timers?
Thanks,
Dinh
next prev parent reply other threads:[~2026-09-21 16:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 7:01 [PATCH 0/3] clk: socfpga: convert clock managers " 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
2026-09-21 16:59 ` Dinh Nguyen [this message]
2026-09-21 19:57 ` Brian Masney
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=c89f566b-9fd7-4824-ad19-bd8b055d2736@kernel.org \
--to=dinguyen@kernel.org \
--cc=adrian.ho.yin.ng@altera.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=bmasney@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®