[PATCH v1 00/50] mips: octeon: Add serdes and device helper support incl. DM PCIe driver

Daniel Schwierzeck
2021-04-24T22:49:04Z

Am Freitag, den 11.12.2020, 17:05 +0100 schrieb Stefan Roese:
> This patchset adds the serdes and (mostly networking) device helper
> macros and functions, needed to support the still missing Octeon II /
> III devices in mainline U-Boot.
>
> 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 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 headers and helper functions will be used by the upcoming
> support for the Octeon II / III networking drivers, including PHY &
> switch support. It was not easily possible to split these
> infrastructure
> files into a separate patchset, as it is heavily interconnected in
> the
> common QLM/DLM serdes interface initialization. The result is, that
> the
> upcoming ethernet driver support will be much smaller (this is at
> least
> my current assumption).
>
> The added PCIe RC support with the included DM PCIe driver is the
> first
> driver making use of this Octeon serdes infrastructure. This has been
> tested with an Intel E1000 PCIe network card in the Octeon 7304 EBB.
>
> Thanks,
> Stefan
>

series applied to u-boot-mips, thanks.

>
> Aaron Williams (42):
> mips: octeon: Add misc cvmx-helper header files
> mips: octeon: Add cvmx-agl-defs.h header file
> mips: octeon: Add cvmx-asxx-defs.h header file
> mips: octeon: Add cvmx-bgxx-defs.h header file
> mips: octeon: Add cvmx-ciu-defs.h header file
> mips: octeon: Add cvmx-dbg-defs.h header file
> mips: octeon: Add cvmx-dpi-defs.h header file
> mips: octeon: Add cvmx-dtx-defs.h header file
> mips: octeon: Add cvmx-fpa-defs.h header file
> mips: octeon: Add cvmx-gmxx-defs.h header file
> mips: octeon: Add cvmx-gserx-defs.h header file
> mips: octeon: Add cvmx-ipd-defs.h header file
> mips: octeon: Add cvmx-l2c-defs.h header file
> mips: octeon: Add cvmx-mio-defs.h header file
> mips: octeon: Add cvmx-npi-defs.h header file
> mips: octeon: Add cvmx-pcieepx-defs.h header file
> mips: octeon: Add cvmx-pciercx-defs.h header file
> mips: octeon: Add cvmx-pcsx-defs.h header file
> mips: octeon: Add cvmx-pemx-defs.h header file
> mips: octeon: Add cvmx-pepx-defs.h header file
> mips: octeon: Add cvmx-pip-defs.h header file
> mips: octeon: Add cvmx-pki-defs.h header file
> mips: octeon: Add cvmx-pko-defs.h header file
> mips: octeon: Add cvmx-pow-defs.h header file
> mips: octeon: Add cvmx-rst-defs.h header file
> mips: octeon: Add cvmx-sata-defs.h header file
> mips: octeon: Add cvmx-sli-defs.h header file
> mips: octeon: Add cvmx-smix-defs.h header file
> mips: octeon: Add cvmx-sriomaintx-defs.h header file
> mips: octeon: Add cvmx-sriox-defs.h header file
> mips: octeon: Add cvmx-sso-defs.h header file
> mips: octeon: Add misc remaining header files
> mips: octeon: Add cvmx-helper-cfg.c
> mips: octeon: Add cvmx-helper-fdt.c
> mips: octeon: Add cvmx-helper-jtag.c
> mips: octeon: Add cvmx-helper-util.c
> mips: octeon: Add cvmx-helper.c
> mips: octeon: Add cvmx-pcie.c
> mips: octeon: Add cvmx-qlm.c
> mips: octeon: Add octeon_fdt.c
> mips: octeon: Add octeon_qlm.c
> mips: octeon: octeon_ebb7304: Add board specific QLM init code
>
> Stefan Roese (8):
> mips: global_data.h: Add Octeon specific data to arch_global_data
> struct
> mips: octeon: Misc changes required because of the newly added
> headers
> mips: octeon: Move cvmx-lmcx-defs.h from mach/cvmx to mach
> mips: octeon: Makefile: Enable building of the newly added C files
> mips: octeon: Kconfig: Enable CONFIG_SYS_PCI_64BIT
> mips: octeon: mrvl,cn73xx.dtsi: Add PCIe controller DT node
> mips: octeon: Add Octeon PCIe host controller driver
> mips: octeon: octeon_ebb7304_defconfig: Enable Octeon PCIe and
> E1000
>
> arch/mips/dts/mrvl,cn73xx.dtsi | 16 +
> arch/mips/include/asm/global_data.h | 9 +
> arch/mips/mach-octeon/Kconfig | 4 +
> arch/mips/mach-octeon/Makefile | 11 +
> arch/mips/mach-octeon/bootoctlinux.c | 1 +
> arch/mips/mach-octeon/cvmx-bootmem.c | 6 -
> arch/mips/mach-octeon/cvmx-coremask.c | 1 +
> arch/mips/mach-octeon/cvmx-helper-cfg.c | 1914 ++++
> arch/mips/mach-octeon/cvmx-helper-fdt.c | 970 ++
> arch/mips/mach-octeon/cvmx-helper-jtag.c | 172 +
> arch/mips/mach-octeon/cvmx-helper-util.c | 1225 +++
> arch/mips/mach-octeon/cvmx-helper.c | 2611 +++++
> arch/mips/mach-octeon/cvmx-pcie.c | 2487 +++++
> arch/mips/mach-octeon/cvmx-qlm.c | 2350 +++++
> .../mach-octeon/include/mach/cvmx-address.h | 209 +
> .../mach-octeon/include/mach/cvmx-agl-defs.h | 3135 ++++++
> .../mach-octeon/include/mach/cvmx-asxx-defs.h | 709 ++
> .../mach-octeon/include/mach/cvmx-bgxx-defs.h | 4106 +++++++
> .../mach-octeon/include/mach/cvmx-ciu-defs.h | 7351 +++++++++++++
> .../mach-octeon/include/mach/cvmx-cmd-queue.h | 441 +
> .../mach-octeon/include/mach/cvmx-csr-enums.h | 87 +
> arch/mips/mach-octeon/include/mach/cvmx-csr.h | 78 +
> .../mach-octeon/include/mach/cvmx-dbg-defs.h | 33 +
> .../mach-octeon/include/mach/cvmx-dpi-defs.h | 1460 +++
> .../mach-octeon/include/mach/cvmx-dtx-defs.h | 6962 ++++++++++++
> .../mach-octeon/include/mach/cvmx-error.h | 456 +
> .../mach-octeon/include/mach/cvmx-fpa-defs.h | 1866 ++++
> arch/mips/mach-octeon/include/mach/cvmx-fpa.h | 217 +
> .../mips/mach-octeon/include/mach/cvmx-fpa1.h | 196 +
> .../mips/mach-octeon/include/mach/cvmx-fpa3.h | 566 +
> .../include/mach/cvmx-global-resources.h | 213 +
> arch/mips/mach-octeon/include/mach/cvmx-gmx.h | 16 +
> .../mach-octeon/include/mach/cvmx-gmxx-defs.h | 6378 +++++++++++
> .../include/mach/cvmx-gserx-defs.h | 2191 ++++
> .../include/mach/cvmx-helper-agl.h | 68 +
> .../include/mach/cvmx-helper-bgx.h | 335 +
> .../include/mach/cvmx-helper-board.h | 558 +
> .../include/mach/cvmx-helper-cfg.h | 884 ++
> .../include/mach/cvmx-helper-errata.h | 50 +
> .../include/mach/cvmx-helper-fdt.h | 568 +
> .../include/mach/cvmx-helper-fpa.h | 43 +
> .../include/mach/cvmx-helper-gpio.h | 427 +
> .../include/mach/cvmx-helper-ilk.h | 93 +
> .../include/mach/cvmx-helper-ipd.h | 16 +
> .../include/mach/cvmx-helper-jtag.h | 84 +
> .../include/mach/cvmx-helper-loop.h | 37 +
> .../include/mach/cvmx-helper-npi.h | 42 +
> .../include/mach/cvmx-helper-pki.h | 319 +
> .../include/mach/cvmx-helper-pko.h | 51 +
> .../include/mach/cvmx-helper-pko3.h | 76 +
> .../include/mach/cvmx-helper-rgmii.h | 99 +
> .../include/mach/cvmx-helper-sfp.h | 437 +
> .../include/mach/cvmx-helper-sgmii.h | 81 +
> .../include/mach/cvmx-helper-spi.h | 73 +
> .../include/mach/cvmx-helper-srio.h | 72 +
> .../include/mach/cvmx-helper-util.h | 412 +
> .../include/mach/cvmx-helper-xaui.h | 108 +
> .../mach-octeon/include/mach/cvmx-helper.h | 565 +
> .../mach-octeon/include/mach/cvmx-hwfau.h | 606 ++
> .../mach-octeon/include/mach/cvmx-hwpko.h | 570 +
> arch/mips/mach-octeon/include/mach/cvmx-ilk.h | 154 +
> .../mach-octeon/include/mach/cvmx-ipd-defs.h | 1925 ++++
> arch/mips/mach-octeon/include/mach/cvmx-ipd.h | 233 +
> .../mach-octeon/include/mach/cvmx-l2c-defs.h | 172 +
> .../include/mach/{cvmx => }/cvmx-lmcx-defs.h | 0
> .../mach-octeon/include/mach/cvmx-mio-defs.h | 353 +
> .../mach-octeon/include/mach/cvmx-npi-defs.h | 1953 ++++
> .../mach-octeon/include/mach/cvmx-packet.h | 40 +
> .../mips/mach-octeon/include/mach/cvmx-pcie.h | 279 +
> .../include/mach/cvmx-pcieepx-defs.h | 6848 ++++++++++++
> .../include/mach/cvmx-pciercx-defs.h | 5586 ++++++++++
> .../mach-octeon/include/mach/cvmx-pcsx-defs.h | 1005 ++
> .../mach-octeon/include/mach/cvmx-pemx-defs.h | 2028 ++++
> .../mach-octeon/include/mach/cvmx-pexp-defs.h | 1382 +++
> .../mach-octeon/include/mach/cvmx-pip-defs.h | 3040 ++++++
> arch/mips/mach-octeon/include/mach/cvmx-pip.h | 1080 ++
> .../mach-octeon/include/mach/cvmx-pki-defs.h | 2353 +++++
> .../include/mach/cvmx-pki-resources.h | 157 +
> arch/mips/mach-octeon/include/mach/cvmx-pki.h | 970 ++
> .../mach-octeon/include/mach/cvmx-pko-defs.h | 9388
> +++++++++++++++++
> .../mach/cvmx-pko-internal-ports-range.h | 43 +
> .../include/mach/cvmx-pko3-queue.h | 175 +
> .../mach-octeon/include/mach/cvmx-pow-defs.h | 1135 ++
> arch/mips/mach-octeon/include/mach/cvmx-pow.h | 2991 ++++++
> arch/mips/mach-octeon/include/mach/cvmx-qlm.h | 304 +
> .../mips/mach-octeon/include/mach/cvmx-regs.h | 330 +-
> .../mach-octeon/include/mach/cvmx-rst-defs.h | 77 +
> .../mach-octeon/include/mach/cvmx-sata-defs.h | 311 +
> .../mach-octeon/include/mach/cvmx-scratch.h | 113 +
> .../mach-octeon/include/mach/cvmx-sli-defs.h | 6548 ++++++++++++
> .../mach-octeon/include/mach/cvmx-smix-defs.h | 360 +
> .../include/mach/cvmx-sriomaintx-defs.h | 61 +
> .../include/mach/cvmx-sriox-defs.h | 44 +
> .../mach-octeon/include/mach/cvmx-sso-defs.h | 2904 +++++
> arch/mips/mach-octeon/include/mach/cvmx-wqe.h | 1462 +++
> .../mach-octeon/include/mach/octeon-feature.h | 2 +
> .../mach-octeon/include/mach/octeon-model.h | 2 +
> .../mach-octeon/include/mach/octeon_ddr.h | 189 +-
> arch/mips/mach-octeon/octeon_fdt.c | 1040 ++
> arch/mips/mach-octeon/octeon_qlm.c | 5853 ++++++++++
> board/Marvell/octeon_ebb7304/board.c | 732 +-
> configs/octeon_ebb7304_defconfig | 5 +-
> drivers/pci/Kconfig | 6 +
> drivers/pci/Makefile | 1 +
> drivers/pci/pcie_octeon.c | 159 +
> drivers/ram/octeon/octeon3_lmc.c | 28 +-
> drivers/ram/octeon/octeon_ddr.c | 22 +-
> 107 files changed, 118724 insertions(+), 240 deletions(-)
> create mode 100644 arch/mips/mach-octeon/cvmx-helper-cfg.c
> create mode 100644 arch/mips/mach-octeon/cvmx-helper-fdt.c
> create mode 100644 arch/mips/mach-octeon/cvmx-helper-jtag.c
> create mode 100644 arch/mips/mach-octeon/cvmx-helper-util.c
> create mode 100644 arch/mips/mach-octeon/cvmx-helper.c
> create mode 100644 arch/mips/mach-octeon/cvmx-pcie.c
> create mode 100644 arch/mips/mach-octeon/cvmx-qlm.c
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-address.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-agl-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-asxx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-bgxx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-ciu-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-cmd-
> queue.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-csr-
> enums.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-csr.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-dbg-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-dpi-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-dtx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-error.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-fpa-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-fpa.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-fpa1.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-fpa3.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-global-
> resources.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-gmx.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-gmxx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-gserx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> agl.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> bgx.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> board.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> cfg.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> errata.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> fdt.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> fpa.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> gpio.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> ilk.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> ipd.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> jtag.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> loop.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> npi.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> pki.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> pko.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> pko3.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> rgmii.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> sfp.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> sgmii.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> spi.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> srio.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> util.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper-
> xaui.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-helper.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-hwfau.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-hwpko.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-ilk.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-ipd-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-ipd.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-l2c-
> defs.h
> rename arch/mips/mach-octeon/include/mach/{cvmx => }/cvmx-lmcx-
> defs.h (100%)
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-mio-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-npi-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-packet.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pcie.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pcieepx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pciercx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pcsx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pemx-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pexp-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pip-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pip.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pki-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pki-
> resources.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pki.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko-
> internal-ports-range.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko3-
> queue.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pow-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pow.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-qlm.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-rst-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-sata-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-scratch.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-sli-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-smix-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-
> sriomaintx-defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-sriox-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-sso-
> defs.h
> create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-wqe.h
> create mode 100644 arch/mips/mach-octeon/octeon_fdt.c
> create mode 100644 arch/mips/mach-octeon/octeon_qlm.c
> create mode 100644 drivers/pci/pcie_octeon.c
>
--
- Daniel