mbox series

[v3,net-next,00/13] Port the SJA1105 DSA driver to XPCS

Message ID 20210611200531.2384819-1-olteanv@gmail.com
Headers show
Series Port the SJA1105 DSA driver to XPCS | expand

Message

Vladimir Oltean June 11, 2021, 8:05 p.m. UTC
From: Vladimir Oltean <vladimir.oltean@nxp.com>

As requested when adding support for the NXP SJA1110, the SJA1105 driver
could make use of the common XPCS driver, to eliminate some hardware
specific code duplication.

This series modifies the XPCS driver so that it can accommodate the XPCS
instantiation from NXP switches, and the SJA1105 driver so it can expose
what the XPCS driver expects.

Tested on NXP SJA1105S and SJA1110A.

Changes in v3:
None. This is a resend of v2 which had "changes requested" even though
there was no direct feedback.

Changes in v2:
- fix module build (pcs-xpcs-nxp.c is not a different module so this
  means that we need to change the name of pcs-xpcs.ko to pcs_xpcs.ko).
- delete sja1105_sgmii.h
- just check for priv->pcs[port] instead of checking the PHY interface
  mode each time.
- add the 2500base-x check in one place where it was missing (before
  mdio_device_create)
- remove it from a few places where it is no longer necessary now that
  we check more generically for the presence of priv->xpcs[port]

Vladimir Oltean (13):
  net: pcs: xpcs: rename mdio_xpcs_args to dw_xpcs
  net: stmmac: reverse Christmas tree notation in stmmac_xpcs_setup
  net: stmmac: reduce indentation when calling stmmac_xpcs_setup
  net: pcs: xpcs: move register bit descriptions to a header file
  net: pcs: xpcs: add support for sgmii with no inband AN
  net: pcs: xpcs: also ignore phy id if it's all ones
  net: pcs: xpcs: add support for NXP SJA1105
  net: pcs: xpcs: add support for NXP SJA1110
  net: pcs: xpcs: export xpcs_do_config and xpcs_link_up
  net: dsa: sja1105: migrate to xpcs for SGMII
  net: dsa: sja1105: register the PCS MDIO bus for SJA1110
  net: dsa: sja1105: SGMII and 2500base-x on the SJA1110 are 'special'
  net: dsa: sja1105: plug in support for 2500base-x

 MAINTAINERS                                   |   2 +
 drivers/net/dsa/sja1105/Kconfig               |   1 +
 drivers/net/dsa/sja1105/sja1105.h             |   9 +
 drivers/net/dsa/sja1105/sja1105_main.c        | 186 +++----------
 drivers/net/dsa/sja1105/sja1105_mdio.c        | 255 +++++++++++++++++
 drivers/net/dsa/sja1105/sja1105_sgmii.h       |  53 ----
 drivers/net/dsa/sja1105/sja1105_spi.c         |  17 ++
 drivers/net/ethernet/stmicro/stmmac/common.h  |   2 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  10 +-
 .../net/ethernet/stmicro/stmmac/stmmac_mdio.c |   6 +-
 drivers/net/pcs/Makefile                      |   4 +-
 drivers/net/pcs/pcs-xpcs-nxp.c                | 185 ++++++++++++
 drivers/net/pcs/pcs-xpcs.c                    | 263 +++++++++---------
 drivers/net/pcs/pcs-xpcs.h                    | 115 ++++++++
 include/linux/pcs/pcs-xpcs.h                  |  21 +-
 15 files changed, 772 insertions(+), 357 deletions(-)
 delete mode 100644 drivers/net/dsa/sja1105/sja1105_sgmii.h
 create mode 100644 drivers/net/pcs/pcs-xpcs-nxp.c
 create mode 100644 drivers/net/pcs/pcs-xpcs.h

Comments

patchwork-bot+netdevbpf@kernel.org June 11, 2021, 9 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Fri, 11 Jun 2021 23:05:18 +0300 you wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> As requested when adding support for the NXP SJA1110, the SJA1105 driver
> could make use of the common XPCS driver, to eliminate some hardware
> specific code duplication.
> 
> This series modifies the XPCS driver so that it can accommodate the XPCS
> instantiation from NXP switches, and the SJA1105 driver so it can expose
> what the XPCS driver expects.
> 
> [...]

Here is the summary with links:
  - [v3,net-next,01/13] net: pcs: xpcs: rename mdio_xpcs_args to dw_xpcs
    https://git.kernel.org/netdev/net-next/c/5673ef863804
  - [v3,net-next,02/13] net: stmmac: reverse Christmas tree notation in stmmac_xpcs_setup
    https://git.kernel.org/netdev/net-next/c/47538dbeb701
  - [v3,net-next,03/13] net: stmmac: reduce indentation when calling stmmac_xpcs_setup
    https://git.kernel.org/netdev/net-next/c/7413f9a6af00
  - [v3,net-next,04/13] net: pcs: xpcs: move register bit descriptions to a header file
    https://git.kernel.org/netdev/net-next/c/d4433d5b7b34
  - [v3,net-next,05/13] net: pcs: xpcs: add support for sgmii with no inband AN
    https://git.kernel.org/netdev/net-next/c/2031c09e6d5f
  - [v3,net-next,06/13] net: pcs: xpcs: also ignore phy id if it's all ones
    https://git.kernel.org/netdev/net-next/c/36641b045c83
  - [v3,net-next,07/13] net: pcs: xpcs: add support for NXP SJA1105
    https://git.kernel.org/netdev/net-next/c/dd0721ea4c7a
  - [v3,net-next,08/13] net: pcs: xpcs: add support for NXP SJA1110
    https://git.kernel.org/netdev/net-next/c/f7380bba42fd
  - [v3,net-next,09/13] net: pcs: xpcs: export xpcs_do_config and xpcs_link_up
    https://git.kernel.org/netdev/net-next/c/a853c68e29bb
  - [v3,net-next,10/13] net: dsa: sja1105: migrate to xpcs for SGMII
    https://git.kernel.org/netdev/net-next/c/3ad1d171548e
  - [v3,net-next,11/13] net: dsa: sja1105: register the PCS MDIO bus for SJA1110
    https://git.kernel.org/netdev/net-next/c/27871359bdf8
  - [v3,net-next,12/13] net: dsa: sja1105: SGMII and 2500base-x on the SJA1110 are 'special'
    https://git.kernel.org/netdev/net-next/c/ece578bc3ea4
  - [v3,net-next,13/13] net: dsa: sja1105: plug in support for 2500base-x
    https://git.kernel.org/netdev/net-next/c/56b63466333b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html