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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQIvH4jbj9Ifd7Av@pie>
Date: Wed, 29 Oct 2025 15:13:46 +0000
From: Yao Zi <ziyao@...root.org>
To: Drew Fustini <fustini@...nel.org>
Cc: Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
	Albert Ou <aou@...s.berkeley.edu>,
	Michal Wilczynski <m.wilczynski@...sung.com>,
	Alexandre Ghiti <alex@...ti.fr>, devicetree@...r.kernel.org,
	Han Gao <gaohan@...as.ac.cn>, Han Gao <rabenda.cn@...il.com>,
	linux-kernel@...r.kernel.org, Guo Ren <guoren@...nel.org>,
	Philipp Zabel <p.zabel@...gutronix.de>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	linux-riscv@...ts.infradead.org, Fu Wei <wefu@...hat.com>
Subject: Re: [PATCH v3 3/5] reset: th1520: Prepare for supporting multiple
 controllers

On Wed, Oct 29, 2025 at 12:54:25PM +0000, Drew Fustini wrote:
> On Tue, Oct 14, 2025 at 01:10:30PM +0000, Yao Zi wrote:
> > TH1520 SoC is divided into several subsystems, shipping distinct reset
> > controllers with similar control logic. Let's make reset signal mapping
> > a data structure specific to one compatible to prepare for introduction
> > of more reset controllers in the future.
> > 
> > Signed-off-by: Yao Zi <ziyao@...root.org>
> > ---
> >  drivers/reset/reset-th1520.c | 42 +++++++++++++++++++++++++-----------
> >  1 file changed, 30 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/reset/reset-th1520.c b/drivers/reset/reset-th1520.c
> > index 14d964a9c6b6..2b65a95ed021 100644
> > --- a/drivers/reset/reset-th1520.c
> > +++ b/drivers/reset/reset-th1520.c
> [snip]
> > @@ -138,22 +147,31 @@ static int th1520_reset_probe(struct platform_device *pdev)
> >  	if (IS_ERR(priv->map))
> >  		return PTR_ERR(priv->map);
> >  
> > -	/* Initialize GPU resets to asserted state */
> > -	ret = regmap_update_bits(priv->map, TH1520_GPU_RST_CFG,
> > -				 TH1520_GPU_RST_CFG_MASK, 0);
> > -	if (ret)
> > -		return ret;
> > +	if (of_device_is_compatible(dev->of_node, "thead,th1520-reset")) {
> 
> Is there a reason that there is a now a conditional check for the
> compatible here?

Yes, this regmap operation is for initializing GPU resets and thus
modifies TH1520_GPU_RST_CFG, which only applies for the VO reset
controller (with compatible "thead,th1520-reset") but not others, or
other unrelated resets could be unexpectedly asserted.

> Thanks,
> Drew

Regards,
Yao Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ