From: Andre Przywara <andre.przywara@arm.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>, <linux-clk@vger.kernel.org>,
<devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-sunxi@lists.linux.dev>,
Mikhail Kalashnikov <iuncuim@gmail.com>
Subject: Re: [PATCH 2/5] clk: sunxi-ng: generalise update bit
Date: Tue, 9 Sep 2025 17:39:02 +0100 [thread overview]
Message-ID: <20250909173903.6b78cd9c@donnerap> (raw)
In-Reply-To: <CAGb2v66DEh3ZGTsBkX6RELRs+0ZPbMq7bsNQhdUcpxHHMxDhhQ@mail.gmail.com>
On Wed, 10 Sep 2025 00:06:07 +0800
Chen-Yu Tsai <wens@csie.org> wrote:
> On Sat, Sep 6, 2025 at 12:15 PM Chen-Yu Tsai <wens@csie.org> wrote:
> >
> > On Wed, Sep 3, 2025 at 8:09 AM Andre Przywara <andre.przywara@arm.com> wrote:
> > >
> > > A few of the Allwinner A523 CCU clock registers introduced an "update" bit,
> > > which must be set for changes to the other bits to take effect.
> > > Of the three clocks where this was used, it was always bit 27, so we just
> > > encoded this as a single bit feature flag.
> > >
> > > Now the CPU PLL also features the update bit, but puts it at bit 26, so
> > > this flag trick won't work anymore.
> > >
> > > Add an "update_bit" field to the common sunxi clock struct, which takes a
> > > bitmask, so we can encode any bit to use, even potentially multiple of
> > > them. As uninitialised fields are set to 0, we can use this as a default
> > > bitmask to set, so can OR this in unconditionally.
> > >
> > > Change the existing update bit users to use this new encoding, and add
> > > support for the ccu_nm clock on the way, since we will need it there
> > > shortly.
> > >
> > > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >
> > Reviewed-by: Chen-Yu Tsai <wens@csie.org>
>
> Hmm, actually, we also have the "key field" feature. Maybe we should
> generalize that one and merge the two?
Ah, that's a good idea! Somewhat obvious now when looking at the code in
ccu_mux.c, where there are two "reg |= MAGIC_VALUE;" lines next to each other.
Will hack something up for this.
Thanks,
Andre
next prev parent reply other threads:[~2025-09-09 16:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 0:09 [PATCH 0/5] arm64: allwinner: a523: Enable CPU clocks Andre Przywara
2025-09-03 0:09 ` [PATCH 1/5] dt-bindings: clock: sun55i-a523-ccu: Add A523 CPU CCU clock controller Andre Przywara
2025-09-03 8:08 ` Krzysztof Kozlowski
2025-09-03 9:46 ` Andre Przywara
2025-09-03 10:25 ` Krzysztof Kozlowski
2025-09-03 0:09 ` [PATCH 2/5] clk: sunxi-ng: generalise update bit Andre Przywara
2025-09-06 4:15 ` Chen-Yu Tsai
2025-09-09 16:06 ` Chen-Yu Tsai
2025-09-09 16:39 ` Andre Przywara [this message]
2025-09-03 0:09 ` [PATCH 3/5] clk: sunxi-ng: mp: support clocks with just a shift register Andre Przywara
2025-09-03 4:20 ` Chen-Yu Tsai
2025-09-03 10:20 ` Andre Przywara
2025-09-09 13:32 ` Chen-Yu Tsai
2025-09-03 0:09 ` [PATCH 4/5] clk: sunxi-ng: add support for the A523/T527 CPU CCU Andre Przywara
2025-09-03 10:26 ` Krzysztof Kozlowski
2025-09-03 0:09 ` [PATCH 5/5] arm64: dts: allwinner: a523: add CPU clocks Andre Przywara
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=20250909173903.6b78cd9c@donnerap \
--to=andre.przywara@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=iuncuim@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).