public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Yixun Lan <dlan@gentoo.org>
To: Yao Zi <me@ziyao.cc>
Cc: Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Haylen Chu <heylenay@4d2.org>,
	Inochi Amaoto <inochiama@gmail.com>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 4/4] clk: spacemit: k3: add the clock tree
Date: Thu, 18 Dec 2025 15:41:10 +0800	[thread overview]
Message-ID: <20251218074110-GYB1943598@gentoo.org> (raw)
In-Reply-To: <aTo8sCPpVM1o9PKX@pie>

Hi Yao,

On 03:38 Thu 11 Dec     , Yao Zi wrote:
> On Thu, Dec 11, 2025 at 09:19:44AM +0800, Yixun Lan wrote:
> > Add clock support to SpacemiT K3 SoC, the clock tree consist of several
> > blocks which are APBC, APBS, APMU, DCIU, MPUM.
> > 
> > Signed-off-by: Yixun Lan <dlan@gentoo.org>
> > ---
> >  drivers/clk/spacemit/Kconfig     |    6 +
> >  drivers/clk/spacemit/Makefile    |   11 +-
> >  drivers/clk/spacemit/ccu-k3.c    | 1641 ++++++++++++++++++++++++++++++++++++++
> >  include/soc/spacemit/ccu.h       |   18 +
> >  include/soc/spacemit/k1-syscon.h |   12 +-
> >  include/soc/spacemit/k3-syscon.h |  273 +++++++
> >  6 files changed, 1947 insertions(+), 14 deletions(-)
> 
...
> > +
> > +	return devm_add_action_or_reset(dev, spacemit_adev_unregister, adev);
> > +}
> 
> This piece of code looks quiet similar to types/functions with the same
> names in ccu-k1.c. If I'm correct, could we separate the logic into a
> new file and avoid duplication?
> 
make sense, will do

> 
> k3_ccu_probe looks quote similar to k1_ccu_probe, too. The only
> difference is that k3_ccu_probe checks for spacemit,k3-pll instead of
> spacemit,k1-pll.
> 
> We could share most of the probe code by writing a SoC-independent probe
> function,
> 
> 	int spacemit_ccu_probe(struct platform_dev *pdev,
> 			       const char *pll_compatible);
> 
> and calling it in ccu-k1.c and ccu-k3.c with different pll_compatible.
> 
ditto

thanks
-- 
Yixun Lan (dlan)

      reply	other threads:[~2025-12-18  7:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-11  1:19 [PATCH RFC 0/4] Add clock support for SpacemiT K3 SoC Yixun Lan
2025-12-11  1:19 ` [PATCH RFC 1/4] dt-bindings: soc: spacemit: add k3 syscon compatible Yixun Lan
2025-12-15 16:37   ` Rob Herring (Arm)
2025-12-11  1:19 ` [PATCH RFC 2/4] clk: spacemit: ccu_mix: add inverted enable gate clock Yixun Lan
2025-12-11  3:26   ` Yao Zi
2025-12-11  1:19 ` [PATCH RFC 3/4] clk: spacemit: ccu_pll: add plla type clock Yixun Lan
2025-12-11  1:19 ` [PATCH RFC 4/4] clk: spacemit: k3: add the clock tree Yixun Lan
2025-12-11  3:38   ` Yao Zi
2025-12-18  7:41     ` Yixun Lan [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=20251218074110-GYB1943598@gentoo.org \
    --to=dlan@gentoo.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heylenay@4d2.org \
    --cc=inochiama@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=me@ziyao.cc \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=spacemit@lists.linux.dev \
    /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