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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 4 Apr 2023 10:06:59 +0200
From:   Lorenzo Bianconi <lorenzo@...nel.org>
To:     Paolo Abeni <pabeni@...hat.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, matthias.bgg@...il.com,
        linux-mediatek@...ts.infradead.org, nbd@....name, john@...ozen.org,
        sean.wang@...iatek.com, Mark-MC.Lee@...iatek.com,
        lorenzo.bianconi@...hat.com, daniel@...rotopia.org,
        krzysztof.kozlowski+dt@...aro.org, robh+dt@...nel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v2 net-next 02/10] net: ethernet: mtk_wed: move cpuboot
 in a dedicated dts node

> On Fri, 2023-03-31 at 15:12 +0200, Lorenzo Bianconi wrote:
> > Since the cpuboot memory region is not part of the RAM MT7986 SoC,
> > move cpuboot in a deidicated syscon node.
> > Keep backward-compatibility with older dts version where cpuboot was
> > defined as reserved-memory child node.
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> > ---
> >  drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 34 +++++++++++++++++----
> >  drivers/net/ethernet/mediatek/mtk_wed_wo.h  |  3 +-
> >  2 files changed, 30 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
> > index 6624f6d6abdd..797c3b412ab6 100644
> > --- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
> > +++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
> > @@ -18,12 +18,23 @@
> >  
> >  static u32 wo_r32(struct mtk_wed_wo *wo, u32 reg)
> >  {
> > -	return readl(wo->boot.addr + reg);
> > +	u32 val;
> > +
> > +	if (!wo->boot_regmap)
> > +		return readl(wo->boot.addr + reg);
> > +
> > +	if (regmap_read(wo->boot_regmap, reg, &val))
> > +		val = ~0;
> > +
> > +	return val;
> >  }
> >  
> >  static void wo_w32(struct mtk_wed_wo *wo, u32 reg, u32 val)
> >  {
> > -	writel(val, wo->boot.addr + reg);
> > +	if (wo->boot_regmap)
> > +		regmap_write(wo->boot_regmap, reg, val);
> > +	else
> > +		writel(val, wo->boot.addr + reg);
> 
> Very minor nit: it would be more consistent with the read function
> above if you invert the 2 branches, e.g.:
> 
> 	if (!wo->boot_regmap)
> 		writel(val, wo->boot.addr + reg);
> 	else
> 		regmap_write(wo->boot_regmap, reg, val);
> 
> No need to repost just for the above, just take into consideration if a
> new version will be needed for other reasons (DT)

ack, will do.

Regards,
Lorenzo

> 
> Cheers,
> 
> Paolo
> 

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ