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: <20251226121812-GYA2007514@gentoo.org>
Date: Fri, 26 Dec 2025 20:18:12 +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>,
	Guodong Xu <guodong@...cstar.com>,
	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 v3 5/5] clk: spacemit: k3: add the clock tree

Hi Yao,

On 11:39 Fri 26 Dec     , Yao Zi wrote:
> On Fri, Dec 26, 2025 at 07:01:20PM +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     |    3 +
> >  drivers/clk/spacemit/ccu-k3.c     | 1482 +++++++++++++++++++++++++++++++++++++
> >  drivers/clk/spacemit/ccu_common.c |    3 +-
> >  4 files changed, 1493 insertions(+), 1 deletion(-)
> 
> ...
> 
> > diff --git a/drivers/clk/spacemit/ccu_common.c b/drivers/clk/spacemit/ccu_common.c
> > index f1a837aafb46..5132f73be68d 100644
> > --- a/drivers/clk/spacemit/ccu_common.c
> > +++ b/drivers/clk/spacemit/ccu_common.c
> > @@ -144,7 +144,8 @@ int spacemit_ccu_probe(struct platform_device *pdev)
> >  	 * are in APBS region. Reference to MPMU syscon is required to check PLL
> >  	 * status.
> >  	 */
> > -	if (of_device_is_compatible(dev->of_node, "spacemit,k1-pll")) {
> > +	if (of_device_is_compatible(dev->of_node, "spacemit,k1-pll") ||
> > +		of_device_is_compatible(dev->of_node, "spacemit,k3-pll")) {
> 
> To me it's better to add a argument to spacemit_ccu_probe to specify the
> compatible of PLL, so we don't need to modify ccu_common.c each time a
> new SoC is introduced, and the condition won't be pretty long in the
> future.
Adding extra argument will break {struct platform_driver}.probe() prototype

I can think of creating a sepecific helper function for each driver to
hide the change, but still will bring extra cost, something will like:
 k1_ccu_probe(pdev) -> spacemit_ccu_probe(pdev, compatible)

> 
> It isn't a serious issue for now, and I think this piece of code is
> acceptable.
right, I'd be reluctant to do the change

-- 
Yixun Lan (dlan)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ