From: Alex Elder <elder@riscstar.com>
To: Artur Weber <aweber.kernel@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Alex Elder <elder@kernel.org>,
Stanislav Jakubek <stano.jakubek@gmail.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [RFC PATCH 0/5] clk: bcm: kona: Add bus clock support and prerequisite clocks
Date: Mon, 24 Feb 2025 10:20:07 -0600 [thread overview]
Message-ID: <96a72cc3-5c89-48ca-b535-8a9a5cfb52c4@riscstar.com> (raw)
In-Reply-To: <20250216-kona-bus-clock-v1-0-e8779d77a6f2@gmail.com>
On 2/16/25 10:12 AM, Artur Weber wrote:
> This patchset does the following:
>
> - Introduce support for bus clocks. These are fairly similar to
> peripheral clocks, but only implement policy, gate and hyst.
>
> - Introduce support for prerequisite clocks; this way we can
> make peripheral clocks automatically enable their corresponding
> bus clocks.
>
> - Add matching bus clocks for BCM21664 peripheral clocks and update
> device tree bindings to match.
>
> The prerequisite clock portion of this patchset is adapted from an
> older attempt to add bus clocks[1], submitted by Alex Elder. I've
> retained his authorship on that commit.
That was a long time ago!
> Notably, Alex's patchset moved clock initialization to the prepare
> function. This seems to be incorrect; the prepare function gets called
> before the enable function, but not before "set rate"/"set parent"
> functions; thus, while clocks enabled fine, any configuration done
> before they were first enabled was broken. I ignored that part of
> the patchset and only kept the prerequisite clocks.
I think you're right.
> I would appreciate feedback on the prerequisite clock patch, hence
> why this patchset is marked as RFC.
>
> I wasn't able to find any other driver that does something like this,
> so I'm not sure if it's correct (especially since I had to switch from
> non-locking __clk_prepare and __clk_enable to the regular locking
> versions, as the non-locking versions are no longer public - they
> appear to have been replaced by clk_core counterparts, but those
> functions are not exported anywhere AFAICT).
>
> An alternative way to do this dependency would be to wrap every
> component with a relevant bus clock in a "simple-pm-bus" node
> with the bus clock in DT, but this seems rather unwieldy.
Yes I had the same thought, and ask about this on patch 3. I
can't comment on whether this notion of a prerequisite (that
is not its parent) makes sense though.
I didn't look at patch 1 or patch 5.
-Alex
>
> [1] https://lore.kernel.org/lkml/1402926007-4436-1-git-send-email-elder@linaro.org/
>
> Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
> ---
> Alex Elder (1):
> clk: bcm281xx: implement prerequisite clocks
>
> Artur Weber (4):
> dt-bindings: clock: brcm,kona-ccu: Add BCM21664 bus clocks
> clk: bcm: kona: Add support for bus clocks
> clk: bcm21664: Add matching bus clocks for peripheral clocks
> ARM: dts: bcm2166x-common: Add matching bus clocks for peripheral clocks
>
> .../devicetree/bindings/clock/brcm,kona-ccu.yaml | 18 ++-
> arch/arm/boot/dts/broadcom/bcm2166x-common.dtsi | 28 +++--
> drivers/clk/bcm/clk-bcm21664.c | 107 ++++++++++++++++--
> drivers/clk/bcm/clk-kona-setup.c | 116 +++++++++++++++++++
> drivers/clk/bcm/clk-kona.c | 124 ++++++++++++++++++++-
> drivers/clk/bcm/clk-kona.h | 30 ++++-
> include/dt-bindings/clock/bcm21664.h | 19 +++-
> 7 files changed, 411 insertions(+), 31 deletions(-)
> ---
> base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
> change-id: 20250212-kona-bus-clock-4297eefae940
>
> Best regards,
prev parent reply other threads:[~2025-02-24 16:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-16 16:12 Artur Weber
2025-02-16 16:12 ` [PATCH RFC 1/5] dt-bindings: clock: brcm,kona-ccu: Add BCM21664 bus clocks Artur Weber
2025-02-21 20:20 ` Rob Herring (Arm)
2025-02-16 16:12 ` [PATCH RFC 2/5] clk: bcm: kona: Add support for " Artur Weber
2025-02-24 16:20 ` Alex Elder
2025-02-16 16:12 ` [PATCH RFC 3/5] clk: bcm281xx: implement prerequisite clocks Artur Weber
2025-02-24 16:20 ` Alex Elder
2025-02-25 18:48 ` Artur Weber
2025-02-25 19:35 ` Alex Elder
2025-02-16 16:12 ` [PATCH RFC 4/5] clk: bcm21664: Add matching bus clocks for peripheral clocks Artur Weber
2025-02-21 20:23 ` Rob Herring
2025-02-24 16:20 ` Alex Elder
2025-02-16 16:12 ` [PATCH RFC 5/5] ARM: dts: bcm2166x-common: " Artur Weber
2025-02-24 16:20 ` Alex Elder [this message]
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=96a72cc3-5c89-48ca-b535-8a9a5cfb52c4@riscstar.com \
--to=elder@riscstar.com \
--cc=aweber.kernel@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elder@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rjui@broadcom.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=sbranden@broadcom.com \
--cc=stano.jakubek@gmail.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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®