netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] net: stmmac: dwmac-rk: Validate GRF and peripheral GRF during probe
@ 2025-03-08 21:37 Jonas Karlman
  2025-03-08 21:37 ` [PATCH v2 1/3] dt-bindings: net: rockchip-dwmac: Require rockchip,grf and rockchip,php-grf Jonas Karlman
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Jonas Karlman @ 2025-03-08 21:37 UTC (permalink / raw)
  To: Heiko Stuebner, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, netdev,
	linux-rockchip, devicetree, linux-arm-kernel, linux-kernel,
	Jonas Karlman

All Rockchip GMAC variants typically write to GRF regs to control e.g.
interface mode, speed and MAC rx/tx delay. Newer SoCs such as RK3576 and
RK3588 use a mix of GRF and peripheral GRF regs. These syscon regmaps is
located with help of a rockchip,grf and rockchip,php-grf phandle.

However, validating the rockchip,grf and rockchip,php-grf syscon regmap
is deferred until e.g. interface mode or speed is configured.

This series change to validate the GRF and peripheral GRF syscon regmap
at probe time to help simplify the SoC specific operations.

This should not introduce any backward compatibility issues as all
GMAC nodes have been added together with a rockchip,grf phandle (and
rockchip,php-grf where required) in their initial commit.

Changes in v2:
- Split removal of the IS_ERR() check in each SoC specific operation to
  a separate patch
- Disable rockchip,php-grf in schema for GMAC not requiring it
- Add a php_grf_required flag to indicate when peripheral GRF is
  required
- Only lookup rockchip,php-grf phandle when php_grf_required is true
- Use ERR_CAST() instead of ERR_PTR()

Jonas Karlman (3):
  dt-bindings: net: rockchip-dwmac: Require rockchip,grf and
    rockchip,php-grf
  net: stmmac: dwmac-rk: Validate GRF and peripheral GRF during probe
  net: stmmac: dwmac-rk: Remove unneeded GRF and peripheral GRF checks

 .../bindings/net/rockchip-dwmac.yaml          |  21 +-
 .../net/ethernet/stmicro/stmmac/dwmac-rk.c    | 270 ++----------------
 2 files changed, 37 insertions(+), 254 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-13 10:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-08 21:37 [PATCH v2 0/3] net: stmmac: dwmac-rk: Validate GRF and peripheral GRF during probe Jonas Karlman
2025-03-08 21:37 ` [PATCH v2 1/3] dt-bindings: net: rockchip-dwmac: Require rockchip,grf and rockchip,php-grf Jonas Karlman
2025-03-10  9:57   ` Krzysztof Kozlowski
2025-03-08 21:37 ` [PATCH v2 2/3] net: stmmac: dwmac-rk: Validate GRF and peripheral GRF during probe Jonas Karlman
2025-03-12 17:05   ` Simon Horman
2025-03-08 21:37 ` [PATCH v2 3/3] net: stmmac: dwmac-rk: Remove unneeded GRF and peripheral GRF checks Jonas Karlman
2025-03-12 17:06   ` Simon Horman
2025-03-09 21:17 ` [PATCH v2 0/3] net: stmmac: dwmac-rk: Validate GRF and peripheral GRF during probe Sebastian Reichel
2025-03-13 10:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).