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: <af7e4420-b773-48dd-aaf4-269f63c624e1@broadcom.com>
Date: Thu, 17 Jul 2025 11:47:38 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Kyle Hendry <kylehendrydev@...il.com>, Andrew Lunn <andrew@...n.ch>,
 Vladimir Oltean <olteanv@...il.com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Russell King <linux@...linux.org.uk>
Cc: noltari@...il.com, jonas.gorski@...il.com,
 Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 5/8] net: dsa: b53: mmap: Add register layout for
 bcm63268

On 7/15/25 17:29, Kyle Hendry wrote:
> Add a structure to describe the ephy control register
> and add register info for bcm63268.
> 
> Signed-off-by: Kyle Hendry <kylehendrydev@...il.com>
> ---
>   drivers/net/dsa/b53/b53_mmap.c | 21 +++++++++++++++++++++
>   1 file changed, 21 insertions(+)
> 
> diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
> index 09631792049c..35bf39ab2771 100644
> --- a/drivers/net/dsa/b53/b53_mmap.c
> +++ b/drivers/net/dsa/b53/b53_mmap.c
> @@ -27,9 +27,26 @@
>   
>   #include "b53_priv.h"
>   
> +struct b53_phy_info {
> +	u32 ephy_enable_mask;
> +	u32 ephy_port_mask;
> +	u32 ephy_bias_bit;
> +	const u32 *ephy_offset;
> +};
> +
>   struct b53_mmap_priv {
>   	void __iomem *regs;
>   	struct regmap *gpio_ctrl;
> +	const struct b53_phy_info *phy_info;
> +};
> +
> +static const u32 bcm63268_ephy_offsets[] = {4, 9, 14};
> +
> +static const struct b53_phy_info bcm63268_ephy_info = {
> +	.ephy_enable_mask = GENMASK(4, 0),
> +	.ephy_port_mask = GENMASK((ARRAY_SIZE(bcm63268_ephy_offsets) - 1), 0),
> +	.ephy_bias_bit = 24,
> +	.ephy_offset = bcm63268_ephy_offsets,
>   };
>   
>   static int b53_mmap_read8(struct b53_device *dev, u8 page, u8 reg, u8 *val)
> @@ -316,6 +333,10 @@ static int b53_mmap_probe(struct platform_device *pdev)
>   	priv->regs = pdata->regs;
>   
>   	priv->gpio_ctrl = syscon_regmap_lookup_by_phandle(np, "brcm,gpio-ctrl");
> +	if (!IS_ERR(priv->gpio_ctrl)) {

This check IMHO belongs in patch #2, even though it only starts being 
useful now. Up to you, and depending upon other comments.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ