linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] net: sparx5: prepare for lan969x switch driver
@ 2024-10-01 13:50 Daniel Machon
  2024-10-01 13:50 ` [PATCH net-next 01/15] net: sparx5: add support for private match data Daniel Machon
                   ` (15 more replies)
  0 siblings, 16 replies; 31+ messages in thread
From: Daniel Machon @ 2024-10-01 13:50 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Lars Povlsen, Steen Hegelund, horatiu.vultur,
	jensemil.schulzostergaard, UNGLinuxDriver, Richard Cochran, horms,
	justinstitt, gal, aakash.r.menon, jacob.e.keller
  Cc: netdev, linux-arm-kernel, linux-kernel

== Description:

This series is the first of a multi-part series, that prepares and adds
support for the new lan969x switch driver.

The upstreaming efforts is split into multiple series (might change a
bit as we go along):

    1) Prepare the Sparx5 driver for lan969x (this series)
    2) Add support lan969x (same basic features as Sparx5 provides +
       RGMII, excl.  FDMA and VCAP)
    3) Add support for lan969x FDMA
    4) Add support for lan969x VCAP

== Lan969x in short:

The lan969x Ethernet switch family [1] provides a rich set of
switching features and port configurations (up to 30 ports) from 10Mbps
to 10Gbps, with support for RGMII, SGMII, QSGMII, USGMII, and USXGMII,
ideal for industrial & process automation infrastructure applications,
transport, grid automation, power substation automation, and ring &
intra-ring topologies. The LAN969x family is hardware and software
compatible and scalable supporting 46Gbps to 102Gbps switch bandwidths.

== Preparing Sparx5 for lan969x:

The lan969x switch chip reuses many of the IP's of the Sparx5 switch
chip, therefore it has been decided to add support through the existing
Sparx5 driver, in order to avoid a bunch of duplicate code. However, in
order to reuse the Sparx5 switch driver, we have to introduce some
mechanisms to handle the chip differences that are there.  These
mechanisms are:

    - Platform match data to contain all the differences that needs to
      be handled (constants, ops etc.)

    - Register macro indirection layer so that we can reuse the existing
      register macros.

    - Function for branching out on platform type where required.

In some places we ops out functions and in other places we branch on the
chip type. Exactly when we choose one over the other, is an estimate in
each case.

After this series is applied, the Sparx5 driver will be prepared for
lan969x and still function exactly as before.

== Patch breakdown:

Patch #1     adds private match data

Patch #2     adds register macro indirection layer

Patch #3-#5  does some preparation work

Patch #6-#8  adds chip constants and updates the code to use them

Patch #9-#14 adds and uses ops for handling functions differently on the
             two platforms.

Patch #15    adds and uses a macro for branching out on the chip type

[1] https://www.microchip.com/en-us/product/lan9698

To: David S. Miller <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Lars Povlsen <lars.povlsen@microchip.com>
To: Steen Hegelund <Steen.Hegelund@microchip.com>
To: horatiu.vultur@microchip.com
To: jensemil.schulzostergaard@microchip.com
To: UNGLinuxDriver@microchip.com
To: Richard Cochran <richardcochran@gmail.com>
To: horms@kernel.org
To: justinstitt@google.com
To: gal@nvidia.com
To: aakash.r.menon@gmail.com
To: jacob.e.keller@intel.com
Cc: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
---
Daniel Machon (15):
      net: sparx5: add support for private match data
      net: sparx5: add indirection layer to register macros
      net: sparx5: rename *spx5 to *sparx5 in a few places
      net: sparx5: modify SPX5_PORTS_ALL macro
      net: sparx5: add *sparx5 argument to a few functions
      net: sparx5: add constants to match data
      net: sparx5: use SPX5_CONST for constants which already have a symbol
      net: sparx5: use SPX5_CONST for constants which do not have a symbol
      net: sparx5: add ops to match data
      net: sparx5: ops out chip port to device index/bit functions
      net: sparx5: ops out functions for getting certain array values
      net: sparx5: ops out function for setting the port mux
      net: sparx5: ops out PTP IRQ handler
      net: sparx5: ops out function for DSM calendar calculation
      net: sparx5: add is_sparx5 macro and use it throughout

 drivers/net/ethernet/microchip/sparx5/Makefile     |    2 +-
 .../ethernet/microchip/sparx5/sparx5_calendar.c    |   41 +-
 drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c |    5 +-
 .../net/ethernet/microchip/sparx5/sparx5_ethtool.c |   33 +-
 .../net/ethernet/microchip/sparx5/sparx5_fdma.c    |    6 +-
 .../ethernet/microchip/sparx5/sparx5_mactable.c    |    6 +-
 .../net/ethernet/microchip/sparx5/sparx5_main.c    |  198 +-
 .../net/ethernet/microchip/sparx5/sparx5_main.h    |  111 +-
 .../ethernet/microchip/sparx5/sparx5_main_regs.h   | 4128 +++++++++++---------
 .../net/ethernet/microchip/sparx5/sparx5_netdev.c  |    8 +-
 .../net/ethernet/microchip/sparx5/sparx5_packet.c  |    4 +-
 .../net/ethernet/microchip/sparx5/sparx5_pgid.c    |   24 +-
 .../net/ethernet/microchip/sparx5/sparx5_police.c  |    3 +-
 .../net/ethernet/microchip/sparx5/sparx5_port.c    |   71 +-
 .../net/ethernet/microchip/sparx5/sparx5_port.h    |   23 +-
 .../net/ethernet/microchip/sparx5/sparx5_psfp.c    |   45 +-
 drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c |    6 +-
 drivers/net/ethernet/microchip/sparx5/sparx5_qos.c |    8 +-
 drivers/net/ethernet/microchip/sparx5/sparx5_qos.h |    4 +-
 .../net/ethernet/microchip/sparx5/sparx5_regs.c    |  219 ++
 .../net/ethernet/microchip/sparx5/sparx5_regs.h    |  244 ++
 .../net/ethernet/microchip/sparx5/sparx5_sdlb.c    |   15 +-
 .../ethernet/microchip/sparx5/sparx5_switchdev.c   |   53 +-
 drivers/net/ethernet/microchip/sparx5/sparx5_tc.c  |    8 +-
 .../net/ethernet/microchip/sparx5/sparx5_vlan.c    |   44 +-
 25 files changed, 3191 insertions(+), 2118 deletions(-)
---
base-commit: 3a39d672e7f48b8d6b91a09afa4b55352773b4b5
change-id: 20240927-b4-sparx5-lan969x-switch-driver-dfcd5277fa70

Best regards,
-- 
Daniel Machon <daniel.machon@microchip.com>



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

end of thread, other threads:[~2024-10-02 21:46 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 13:50 [PATCH net-next 00/15] net: sparx5: prepare for lan969x switch driver Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 01/15] net: sparx5: add support for private match data Daniel Machon
2024-10-01 17:43   ` Jacob Keller
2024-10-01 13:50 ` [PATCH net-next 03/15] net: sparx5: rename *spx5 to *sparx5 in a few places Daniel Machon
2024-10-01 17:54   ` Jacob Keller
2024-10-01 13:50 ` [PATCH net-next 04/15] net: sparx5: modify SPX5_PORTS_ALL macro Daniel Machon
2024-10-01 17:54   ` Jacob Keller
2024-10-01 13:50 ` [PATCH net-next 05/15] net: sparx5: add *sparx5 argument to a few functions Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 06/15] net: sparx5: add constants to match data Daniel Machon
2024-10-01 17:56   ` Jacob Keller
2024-10-02 12:47   ` Jakub Kicinski
2024-10-02 13:31     ` Daniel Machon
2024-10-02 14:33       ` Jakub Kicinski
2024-10-02 18:28         ` Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 07/15] net: sparx5: use SPX5_CONST for constants which already have a symbol Daniel Machon
2024-10-01 17:58   ` Jacob Keller
2024-10-01 13:50 ` [PATCH net-next 08/15] net: sparx5: use SPX5_CONST for constants which do not " Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 09/15] net: sparx5: add ops to match data Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 10/15] net: sparx5: ops out chip port to device index/bit functions Daniel Machon
2024-10-01 18:00   ` Jacob Keller
2024-10-02  7:48     ` Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 11/15] net: sparx5: ops out functions for getting certain array values Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 12/15] net: sparx5: ops out function for setting the port mux Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 13/15] net: sparx5: ops out PTP IRQ handler Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 14/15] net: sparx5: ops out function for DSM calendar calculation Daniel Machon
2024-10-01 13:50 ` [PATCH net-next 15/15] net: sparx5: add is_sparx5 macro and use it throughout Daniel Machon
     [not found] ` <20241001-b4-sparx5-lan969x-switch-driver-v1-2-8c6896fdce66@microchip.com>
2024-10-01 17:52   ` [PATCH net-next 02/15] net: sparx5: add indirection layer to register macros Jacob Keller
2024-10-02  8:07     ` Daniel Machon
2024-10-01 18:03 ` [PATCH net-next 00/15] net: sparx5: prepare for lan969x switch driver Jacob Keller
2024-10-02  7:47   ` Daniel Machon
2024-10-02 21:44     ` Jacob Keller

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).