mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@nabladev.com>
To: Abel Vesa <abelvesa@kernel.org>, Peng Fan <peng.fan@nxp.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	Lukasz Majewski <lukma@nabladev.com>
Subject: [PATCH v4 1/4] clk: vf610: Move VF610_CLK_END define to clk-vf610 driver
Date: Thu, 29 Jan 2026 10:54:39 +0100	[thread overview]
Message-ID: <20260129095442.1646748-2-lukma@nabladev.com> (raw)
In-Reply-To: <20260129095442.1646748-1-lukma@nabladev.com>

The VF610_CLK_END was previously defined in vf610-clock.h to indicate
the number of clocks.

It is solely used in the clk driver to allocate proper size of the clk
table.

Moreover, when new clocks (like e.g. ones for MTIP L2 switch) are defined
its value also changes, so it shall be locally adjusted.

Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
---
Changes for v4:
- Separate patch
- Add comment regarding value of VF610_CLK_END
---
 drivers/clk/imx/clk-vf610.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/clk/imx/clk-vf610.c b/drivers/clk/imx/clk-vf610.c
index 9e11f1c7c397..457156944c67 100644
--- a/drivers/clk/imx/clk-vf610.c
+++ b/drivers/clk/imx/clk-vf610.c
@@ -11,6 +11,13 @@
 
 #include "clk.h"
 
+/*
+ * The VF610_CLK_END corresponds to ones defined in
+ * include/dt-bindings/clock/vf610-clock.h
+ * It shall be the value of the last defined clock +1
+ */
+#define VF610_CLK_END 191
+
 #define CCM_CCR			(ccm_base + 0x00)
 #define CCM_CSR			(ccm_base + 0x04)
 #define CCM_CCSR		(ccm_base + 0x08)
-- 
2.39.5


  reply	other threads:[~2026-01-29 10:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29  9:54 [PATCH v4 0/4] clk: vf610: Add clocks to support MTIP L2 switch Lukasz Majewski
2026-01-29  9:54 ` Lukasz Majewski [this message]
2026-01-29  9:54 ` [PATCH v4 2/4] dt-bindings: clock: vf610: Drop VF610_CLK_END define Lukasz Majewski
2026-01-29 16:56   ` Rob Herring (Arm)
2026-01-29  9:54 ` [PATCH v4 3/4] dt-bindings: clock: vf610: Add definitions for MTIP L2 switch Lukasz Majewski
2026-01-29 16:57   ` Rob Herring (Arm)
2026-01-29  9:54 ` [PATCH v4 4/4] clk: vf610: Add support for the Ethernet switch clocks Lukasz Majewski
2026-02-02  1:56 ` [PATCH v4 0/4] clk: vf610: Add clocks to support MTIP L2 switch Peng Fan
2026-02-16  9:15   ` Łukasz Majewski
2026-02-16 10:32     ` Abel Vesa
2026-02-16 11:33       ` Łukasz Majewski
2026-03-18 15:39 ` Abel Vesa

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=20260129095442.1646748-2-lukma@nabladev.com \
    --to=lukma@nabladev.com \
    --cc=abelvesa@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=peng.fan@nxp.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@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®