mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Chuan Liu via B4 Relay <devnull+chuan.liu.amlogic.com@kernel.org>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	 Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	 Chuan Liu <chuan.liu@amlogic.com>
Subject: [PATCH 02/10] soc: amlogic: clk-measure: Support more measurement channels
Date: Fri, 11 Sep 2026 16:28:29 +0800	[thread overview]
Message-ID: <20260911-more-socs-to-support-clk_measure-v1-2-940e269aa52f@amlogic.com> (raw)
In-Reply-To: <20260911-more-socs-to-support-clk_measure-v1-0-940e269aa52f@amlogic.com>

From: Chuan Liu <chuan.liu@amlogic.com>

On S4 and C3, as well as later SoCs, the clk-measure IP expands the
number of supported measurement channels from 128 to 256. Accordingly,
the MSR_CLK_SRC field in the register is extended from 7 bits to 8 bits.

To support both the old and new implementations, the driver now
uniformly defines the valid MSR_CLK_SRC field as bits[27:20].

For SoCs where MSR_CLK_SRC is only 7 bits wide, the driver never sets
bit27, and on those SoCs bit27 is read-only. Therefore, using
bits[27:20] as the unified field definition does not introduce any
behavioral change or compatibility issue for existing SoCs.

Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
---
 drivers/soc/amlogic/meson-clk-measure.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/amlogic/meson-clk-measure.c b/drivers/soc/amlogic/meson-clk-measure.c
index 8a1a9fed0e74..0d4ba2555d17 100644
--- a/drivers/soc/amlogic/meson-clk-measure.c
+++ b/drivers/soc/amlogic/meson-clk-measure.c
@@ -20,7 +20,7 @@ static DEFINE_MUTEX(measure_lock);
 #define MSR_CONT		BIT(17) /* continuous measurement */
 #define MSR_INTR		BIT(18) /* interrupts */
 #define MSR_RUN			BIT(19)
-#define MSR_CLK_SRC		GENMASK(26, 20)
+#define MSR_CLK_SRC		GENMASK(27, 20)
 #define MSR_BUSY		BIT(31)
 
 #define MSR_VAL_MASK		GENMASK(15, 0)

-- 
2.42.0



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2026-09-11  8:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11  8:28 [PATCH 00/10] soc: amlogic: clk-measure: Add support for more SoCs Chuan Liu via B4 Relay
2026-09-11  8:28 ` [PATCH 01/10] dt-bindings: soc: amlogic: Add compatible to support " Chuan Liu via B4 Relay
2026-09-13  9:03   ` Krzysztof Kozlowski
2026-09-14  2:50     ` Chuan Liu
2026-09-11  8:28 ` Chuan Liu via B4 Relay [this message]
2026-09-11  8:28 ` [PATCH 03/10] soc: amlogic: clk-measure: Add support for " Chuan Liu via B4 Relay
2026-09-11  8:37   ` sashiko-bot
2026-09-14  3:00     ` Chuan Liu
2026-09-11  8:28 ` [PATCH 04/10] soc: amlogic: clk-measure: Optimize CLK_MSR_ID to reduce memory usage Chuan Liu via B4 Relay
2026-09-11  8:28 ` [PATCH 05/10] arm64: dts: amlogic: a5: Add clk-measure controller node Chuan Liu via B4 Relay
2026-09-11  8:28 ` [PATCH 06/10] arm64: dts: amlogic: a4: " Chuan Liu via B4 Relay
2026-09-11  8:28 ` [PATCH 07/10] arm64: dts: amlogic: s7: " Chuan Liu via B4 Relay
2026-09-11  8:28 ` [PATCH 08/10] arm64: dts: amlogic: s7d: " Chuan Liu via B4 Relay
2026-09-11  8:28 ` [PATCH 09/10] arm64: dts: amlogic: s6: " Chuan Liu via B4 Relay
2026-09-11  8:28 ` [PATCH 10/10] arm64: dts: amlogic: a9: " Chuan Liu via B4 Relay

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=20260911-more-socs-to-support-clk_measure-v1-2-940e269aa52f@amlogic.com \
    --to=devnull+chuan.liu.amlogic.com@kernel.org \
    --cc=chuan.liu@amlogic.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@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®