lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251218074110-GYB1943598@gentoo.org>
Date: Thu, 18 Dec 2025 15:41:10 +0800
From: Yixun Lan <dlan@...too.org>
To: Yao Zi <me@...ao.cc>
Cc: Stephen Boyd <sboyd@...nel.org>,
	Michael Turquette <mturquette@...libre.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, Haylen Chu <heylenay@....org>,
	Inochi Amaoto <inochiama@...il.com>, linux-clk@...r.kernel.org,
	devicetree@...r.kernel.org, linux-riscv@...ts.infradead.org,
	spacemit@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 4/4] clk: spacemit: k3: add the clock tree

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@...too.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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ