All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Cc: daniel.schwierzeck@gmail.com, awilliams@marvell.com, cchavva@marvell.com
Subject: [PATCH v2 00/52] mips: octeon: Add ethernet support
Date: Thu,  7 Apr 2022 09:11:02 +0200	[thread overview]
Message-ID: <20220407071154.51997-1-sr@denx.de> (raw)

This patchset adds the networking files and drivers including device
helper headers and C files. Please excuse the massive amount of files
in this patch series. Also the sometimes huge files (mostly headers
with register definitions) that I needed to include.

The infrastructure code with all the headers is ported mistly without
any intended functional changes from the 2013 Cavium / Marvell U-Boot
version. It has undergone many hours of extensive code cleanup and
reformatting. Some of it done by using tools (checkpatch, Lindent, clang
format etc) and also some of it done manually, as I couldn't find some
tools that could do the needed work in a reliable and functional way.
The result is that checkpatch now only throws a "few" warnings that are
left. Some of those can't be removed without an even more extensive
cleanup / rewrite of the code, like the addition of typedefs.

The added header, helper and infrastructure files in the first part of
the patch-series (patches 1-43) are the foundation, that is used by the
main Octeon U-Boot ethernet driver (patch 50/52). Patches 47-49 add the
DT nodes and properties to the corresponding dtsi / dts files. Patches
51 & 52 finally enable the ethernet support both MIPS Octeon boards,
EBB7304 & NIC23.

All this is tested on the 2 Cavium / Marvell MIPS Octeon boards:
EBB7304 & NIC23

This patchset including the small Marvell PHY patches is available in
this gitlab branch:

https://source.denx.de/u-boot/custodians/u-boot-marvell/-/tree/mips-octeon-ethernet-v2-2022-04-07

Changes in v2:
- As suggested by Daniel, remove all unreferenced functions from the source
  code by manually inspecting u-boot.map [1]
- Rebased on latest TOT

[1] Here the diffstat comarison between v1 and v2:
v1:  77 files changed, 42315 insertions(+), 586 deletions(-)
v2:  78 files changed, 33672 insertions(+), 2524 deletions(-)

Thanks,
Stefan

Aaron Williams (40):
  mips: octeon: Add misc cvmx-* header files
  mips: octeon: Add cvmx-ilk-defs.h header file
  mips: octeon: Add cvmx-iob-defs.h header file
  mips: octeon: Add cvmx-lbk-defs.h header file
  mips: octeon: Add cvmx-npei-defs.h header file
  mips: octeon: Add cvmx-pcsxx-defs.h header file
  mips: octeon: Add cvmx-xcv-defs.h header file
  mips: octeon: Add cvmx-helper-agl.c
  mips: octeon: Add cvmx-helper-bgx.c
  mips: octeon: Add cvmx-helper-board.c
  mips: octeon: Add cvmx-helper-fpa.c
  mips: octeon: Add cvmx-helper-ilk.c
  mips: octeon: Add cvmx-helper-ipd.c
  mips: octeon: Add cvmx-helper-loop.c
  mips: octeon: Add cvmx-helper-npi.c
  mips: octeon: Add cvmx-helper-pki.c
  mips: octeon: Add cvmx-helper-pko.c
  mips: octeon: Add cvmx-helper-pko3.c
  mips: octeon: Add cvmx-helper-rgmii.c
  mips: octeon: Add cvmx-helper-sgmii.c
  mips: octeon: Add cvmx-helper-sfp.c
  mips: octeon: Add cvmx-helper-xaui.c
  mips: octeon: Add cvmx-agl.c
  mips: octeon: Add cvmx-cmd-queue.c
  mips: octeon: Add cvmx-fau-compat.c
  mips: octeon: Add cvmx-fpa.c
  mips: octeon: Add cvmx-fpa-resource.c
  mips: octeon: Add cvmx-global-resource.c
  mips: octeon: Add cvmx-ilk.c
  mips: octeon: Add cvmx-ipd.c
  mips: octeon: Add cvmx-pki.c
  mips: octeon: Add cvmx-pki-resources.c
  mips: octeon: Add cvmx-pko.c
  mips: octeon: Add cvmx-pko3.c
  mips: octeon: Add cvmx-pko3-queue.c
  mips: octeon: Add cvmx-pko3-compat.c
  mips: octeon: Add cvmx-pko3-resources.c
  mips: octeon: Add cvmx-pko-internal-ports-range.c
  mips: octeon: Add cvmx-qlm-tables.c
  mips: octeon: Add cvmx-range.c

Stefan Roese (12):
  mips: octeon: Misc changes to existing headers for upcoming eth
    support
  mips: octeon: Misc changes to existing C files for upcoming eth
    support
  mips: octeon: Makefile: Enable building of the newly added C files
  mips: octeon: cpu.c: Move bootmem init to arch_early_init_r()
  mips: octeon: cpu.c: Implement configure_lmtdma_window()
  mips: octeon: octeon_common.h: Move init SP because of increased image
    size
  mips: octeon: mrvl,cn73xx.dtsi: Add ethernet (BGX) and SMI DT nodes
  mips: octeon: mrvl,octeon-ebb7304.dts: Add ethernet DT support
  mips: octeon: mrvl,octeon-nic23.dts: Add ethernet DT support
  net: Add ethernet support for MIPS Octeon
  mips: octeon: ebb7304: Enable ethernet support
  mips: octeon: nic23: Enable ethernet support

 arch/mips/Kconfig                             |    1 +
 arch/mips/dts/mrvl,cn73xx.dtsi                |   35 +
 arch/mips/dts/mrvl,octeon-ebb7304.dts         |   45 +
 arch/mips/dts/mrvl,octeon-nic23.dts           |  238 ++
 arch/mips/mach-octeon/Makefile                |   35 +-
 arch/mips/mach-octeon/cpu.c                   |   47 +-
 arch/mips/mach-octeon/cvmx-agl.c              |  216 +
 arch/mips/mach-octeon/cvmx-bootmem.c          |    3 +-
 arch/mips/mach-octeon/cvmx-cmd-queue.c        |  355 ++
 arch/mips/mach-octeon/cvmx-fau-compat.c       |   53 +
 arch/mips/mach-octeon/cvmx-fpa-resource.c     |  219 +
 arch/mips/mach-octeon/cvmx-fpa.c              | 1127 ++++++
 arch/mips/mach-octeon/cvmx-global-resources.c |  517 +++
 arch/mips/mach-octeon/cvmx-helper-agl.c       |  231 ++
 arch/mips/mach-octeon/cvmx-helper-bgx.c       | 2737 +++++++++++++
 arch/mips/mach-octeon/cvmx-helper-board.c     | 1824 +++++++++
 arch/mips/mach-octeon/cvmx-helper-cfg.c       |  655 +--
 arch/mips/mach-octeon/cvmx-helper-fdt.c       |  898 +----
 arch/mips/mach-octeon/cvmx-helper-fpa.c       |   76 +
 arch/mips/mach-octeon/cvmx-helper-ilk.c       |  902 +++++
 arch/mips/mach-octeon/cvmx-helper-ipd.c       |  286 ++
 arch/mips/mach-octeon/cvmx-helper-loop.c      |  178 +
 arch/mips/mach-octeon/cvmx-helper-npi.c       |  137 +
 arch/mips/mach-octeon/cvmx-helper-pki.c       |  549 +++
 arch/mips/mach-octeon/cvmx-helper-pko.c       |  203 +
 arch/mips/mach-octeon/cvmx-helper-pko3.c      | 1088 +++++
 arch/mips/mach-octeon/cvmx-helper-rgmii.c     |  398 ++
 arch/mips/mach-octeon/cvmx-helper-sfp.c       | 1309 ++++++
 arch/mips/mach-octeon/cvmx-helper-sgmii.c     |  781 ++++
 arch/mips/mach-octeon/cvmx-helper-util.c      |  248 --
 arch/mips/mach-octeon/cvmx-helper-xaui.c      |  518 +++
 arch/mips/mach-octeon/cvmx-helper.c           |  845 +---
 arch/mips/mach-octeon/cvmx-ilk.c              | 1199 ++++++
 arch/mips/mach-octeon/cvmx-ipd.c              |  149 +
 arch/mips/mach-octeon/cvmx-pki-resources.c    |  285 ++
 arch/mips/mach-octeon/cvmx-pki.c              |  910 +++++
 .../cvmx-pko-internal-ports-range.c           |   99 +
 arch/mips/mach-octeon/cvmx-pko.c              |  788 ++++
 arch/mips/mach-octeon/cvmx-pko3-compat.c      |  656 +++
 arch/mips/mach-octeon/cvmx-pko3-queue.c       |  879 ++++
 arch/mips/mach-octeon/cvmx-pko3-resources.c   |  213 +
 arch/mips/mach-octeon/cvmx-pko3.c             |  786 ++++
 arch/mips/mach-octeon/cvmx-qlm-tables.c       |  292 ++
 arch/mips/mach-octeon/cvmx-range.c            |  259 ++
 arch/mips/mach-octeon/include/mach/cvmx-agl.h |   45 +
 .../mach-octeon/include/mach/cvmx-bootmem.h   |    3 +-
 .../mach-octeon/include/mach/cvmx-config.h    |  128 +
 arch/mips/mach-octeon/include/mach/cvmx-fau.h |  581 +++
 arch/mips/mach-octeon/include/mach/cvmx-fpa.h |    3 +-
 .../mips/mach-octeon/include/mach/cvmx-fpa3.h |   37 -
 .../include/mach/cvmx-helper-board.h          |    6 +-
 .../include/mach/cvmx-helper-fdt.h            |   40 +-
 .../include/mach/cvmx-helper-pko.h            |    2 +-
 .../mach-octeon/include/mach/cvmx-helper.h    |   20 +
 .../mach-octeon/include/mach/cvmx-ilk-defs.h  | 2269 +++++++++++
 .../mach-octeon/include/mach/cvmx-iob-defs.h  | 1328 ++++++
 .../mach-octeon/include/mach/cvmx-lbk-defs.h  |  157 +
 .../mips/mach-octeon/include/mach/cvmx-mdio.h |  516 +++
 .../mach-octeon/include/mach/cvmx-npei-defs.h | 3550 +++++++++++++++++
 .../include/mach/cvmx-pcsxx-defs.h            |  787 ++++
 .../include/mach/cvmx-pki-cluster.h           |  343 ++
 arch/mips/mach-octeon/include/mach/cvmx-pko.h |  213 +
 .../include/mach/cvmx-pko3-resources.h        |   36 +
 .../mips/mach-octeon/include/mach/cvmx-pko3.h | 1052 +++++
 .../mach-octeon/include/mach/cvmx-range.h     |   23 +
 .../mips/mach-octeon/include/mach/cvmx-regs.h |  100 +-
 .../mach-octeon/include/mach/cvmx-xcv-defs.h  |  226 ++
 .../mach-octeon/include/mach/octeon_eth.h     |   54 +-
 board/Marvell/octeon_nic23/board.c            |   87 +-
 configs/octeon_ebb7304_defconfig              |    7 +
 configs/octeon_nic23_defconfig                |   10 +-
 drivers/net/Kconfig                           |    7 +
 drivers/net/Makefile                          |    1 +
 drivers/net/octeon/Makefile                   |    6 +
 drivers/net/octeon/octeon_eth.c               | 1060 +++++
 drivers/net/octeon/octeon_mdio.c              |  226 ++
 include/configs/octeon_common.h               |    2 +-
 include/configs/octeon_ebb7304.h              |    2 +
 78 files changed, 33672 insertions(+), 2524 deletions(-)
 create mode 100644 arch/mips/mach-octeon/cvmx-agl.c
 create mode 100644 arch/mips/mach-octeon/cvmx-cmd-queue.c
 create mode 100644 arch/mips/mach-octeon/cvmx-fau-compat.c
 create mode 100644 arch/mips/mach-octeon/cvmx-fpa-resource.c
 create mode 100644 arch/mips/mach-octeon/cvmx-fpa.c
 create mode 100644 arch/mips/mach-octeon/cvmx-global-resources.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-agl.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-bgx.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-board.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-fpa.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-ilk.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-ipd.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-loop.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-npi.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-pki.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-pko.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-pko3.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-rgmii.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-sfp.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-sgmii.c
 create mode 100644 arch/mips/mach-octeon/cvmx-helper-xaui.c
 create mode 100644 arch/mips/mach-octeon/cvmx-ilk.c
 create mode 100644 arch/mips/mach-octeon/cvmx-ipd.c
 create mode 100644 arch/mips/mach-octeon/cvmx-pki-resources.c
 create mode 100644 arch/mips/mach-octeon/cvmx-pki.c
 create mode 100644 arch/mips/mach-octeon/cvmx-pko-internal-ports-range.c
 create mode 100644 arch/mips/mach-octeon/cvmx-pko.c
 create mode 100644 arch/mips/mach-octeon/cvmx-pko3-compat.c
 create mode 100644 arch/mips/mach-octeon/cvmx-pko3-queue.c
 create mode 100644 arch/mips/mach-octeon/cvmx-pko3-resources.c
 create mode 100644 arch/mips/mach-octeon/cvmx-pko3.c
 create mode 100644 arch/mips/mach-octeon/cvmx-qlm-tables.c
 create mode 100644 arch/mips/mach-octeon/cvmx-range.c
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-agl.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-config.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-fau.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-ilk-defs.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-iob-defs.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-lbk-defs.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-mdio.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-npei-defs.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pcsxx-defs.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pki-cluster.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko3-resources.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko3.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-range.h
 create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-xcv-defs.h
 create mode 100644 drivers/net/octeon/Makefile
 create mode 100644 drivers/net/octeon/octeon_eth.c
 create mode 100644 drivers/net/octeon/octeon_mdio.c

-- 
2.35.1


             reply	other threads:[~2022-04-07  7:12 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  7:11 Stefan Roese [this message]
2022-04-07  7:11 ` [PATCH v2 01/52] mips: octeon: Add misc cvmx-* header files Stefan Roese
2022-04-07  7:11 ` [PATCH v2 02/52] mips: octeon: Add cvmx-ilk-defs.h header file Stefan Roese
2022-04-07  7:11 ` [PATCH v2 03/52] mips: octeon: Add cvmx-iob-defs.h " Stefan Roese
2022-04-07  7:11 ` [PATCH v2 04/52] mips: octeon: Add cvmx-lbk-defs.h " Stefan Roese
2022-04-07  7:11 ` [PATCH v2 05/52] mips: octeon: Add cvmx-npei-defs.h " Stefan Roese
2022-04-07  7:11 ` [PATCH v2 06/52] mips: octeon: Add cvmx-pcsxx-defs.h " Stefan Roese
2022-04-07  7:11 ` [PATCH v2 07/52] mips: octeon: Add cvmx-xcv-defs.h " Stefan Roese
2022-04-07  7:11 ` [PATCH v2 08/52] mips: octeon: Misc changes to existing headers for upcoming eth support Stefan Roese
2022-04-07  7:11 ` [PATCH v2 09/52] mips: octeon: Add cvmx-helper-agl.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 10/52] mips: octeon: Add cvmx-helper-bgx.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 11/52] mips: octeon: Add cvmx-helper-board.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 12/52] mips: octeon: Add cvmx-helper-fpa.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 13/52] mips: octeon: Add cvmx-helper-ilk.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 14/52] mips: octeon: Add cvmx-helper-ipd.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 15/52] mips: octeon: Add cvmx-helper-loop.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 16/52] mips: octeon: Add cvmx-helper-npi.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 17/52] mips: octeon: Add cvmx-helper-pki.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 18/52] mips: octeon: Add cvmx-helper-pko.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 19/52] mips: octeon: Add cvmx-helper-pko3.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 20/52] mips: octeon: Add cvmx-helper-rgmii.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 21/52] mips: octeon: Add cvmx-helper-sgmii.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 23/52] mips: octeon: Add cvmx-helper-xaui.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 24/52] mips: octeon: Add cvmx-agl.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 26/52] mips: octeon: Add cvmx-fau-compat.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 27/52] mips: octeon: Add cvmx-fpa.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 30/52] mips: octeon: Add cvmx-ilk.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 33/52] mips: octeon: Add cvmx-pki-resources.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 34/52] mips: octeon: Add cvmx-pko.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 35/52] mips: octeon: Add cvmx-pko3.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 37/52] mips: octeon: Add cvmx-pko3-compat.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 38/52] mips: octeon: Add cvmx-pko3-resources.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 39/52] mips: octeon: Add cvmx-pko-internal-ports-range.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 40/52] mips: octeon: Add cvmx-qlm-tables.c Stefan Roese
2022-04-07  7:11 ` [PATCH v2 42/52] mips: octeon: Misc changes to existing C files for upcoming eth support Stefan Roese
2022-04-07  7:11 ` [PATCH v2 43/52] mips: octeon: Makefile: Enable building of the newly added C files Stefan Roese
2022-04-07  7:11 ` [PATCH v2 44/52] mips: octeon: cpu.c: Move bootmem init to arch_early_init_r() Stefan Roese
2022-04-07  7:11 ` [PATCH v2 45/52] mips: octeon: cpu.c: Implement configure_lmtdma_window() Stefan Roese
2022-04-07  7:11 ` [PATCH v2 46/52] mips: octeon: octeon_common.h: Move init SP because of increased image size Stefan Roese
2022-04-07  7:11 ` [PATCH v2 47/52] mips: octeon: mrvl, cn73xx.dtsi: Add ethernet (BGX) and SMI DT nodes Stefan Roese
2022-04-07  7:11 ` [PATCH v2 48/52] mips: octeon: mrvl, octeon-ebb7304.dts: Add ethernet DT support Stefan Roese
2022-04-07  7:11 ` [PATCH v2 49/52] mips: octeon: mrvl, octeon-nic23.dts: " Stefan Roese
2022-04-07  7:11 ` [PATCH v2 50/52] net: Add ethernet support for MIPS Octeon Stefan Roese
2022-04-07  7:11 ` [PATCH v2 51/52] mips: octeon: ebb7304: Enable ethernet support Stefan Roese
2022-04-07  7:11 ` [PATCH v2 52/52] mips: octeon: nic23: " Stefan Roese
2022-05-02 16:00 ` [PATCH v2 00/52] mips: octeon: Add " Stefan Roese
2022-05-02 18:54   ` Daniel Schwierzeck
2022-05-04  9:25 ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220407071154.51997-1-sr@denx.de \
    --to=sr@denx.de \
    --cc=awilliams@marvell.com \
    --cc=cchavva@marvell.com \
    --cc=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.