lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250630041601.399921-1-hans.zhang@cixtech.com>
Date: Mon, 30 Jun 2025 12:15:47 +0800
From: hans.zhang@...tech.com
To: bhelgaas@...gle.com,
	lpieralisi@...nel.org,
	kw@...ux.com,
	mani@...nel.org,
	robh@...nel.org,
	kwilczynski@...nel.org,
	krzk+dt@...nel.org,
	conor+dt@...nel.org
Cc: mpillai@...ence.com,
	fugang.duan@...tech.com,
	guoyin.chen@...tech.com,
	peter.chen@...tech.com,
	cix-kernel-upstream@...tech.com,
	linux-pci@...r.kernel.org,
	devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Hans Zhang <hans.zhang@...tech.com>
Subject: [PATCH v5 00/14] Enhance the PCIe controller driver

From: Hans Zhang <hans.zhang@...tech.com>

---
Dear Maintainers,

This series is Cadence's HPA PCIe IP and the Root Port driver of our
CIX sky1. Please help review. Thank you very much.
---

Enhances the exiting Cadence PCIe controller drivers to support
HPA (High Performance Architecture) Cadence PCIe controllers.

The patch set enhances the Cadence PCIe driver for HPA support.
The header files are separated out for legacy and high performance
register maps, register address and bit definitions. The driver
read register and write register functions for HPA take the
updated offset stored from the platform driver to access the registers.
As part of refactoring of the code, few new files are added to the
driver by splitting the existing files.
This helps SoC vendor who change the address map within PCIe controller
in their designs. Setting the menuconfig appropriately will allow
selection between RP and/or EP PCIe controller support. The support
will include Legacy and HPA for the selected configuration.

The TI SoC continues to be supported with the changes incorporated.

The changes address the review comments in the previous patches where
the need to move away from "ops" pointers used in current implementation
and separate out the Legacy and HPA driver implementation was stressed.

The scripts/checkpatch.pl has been run on the patches with and without
--strict. With the --strict option, 4 checks are generated on 2 patch
(PATCH v5 2/6 and PATCH v5 3/6 of the series), which can be ignored.
There are no code fixes required for these checks. All other checks
generated by ./scripts/checkpatch.pl --strict can also be ignored.

The ./scripts/kernel-doc --none have been run on the changed files.

The changes are tested on TI platforms. The legacy controller changes are
tested on an TI J7200 EVM. HPA changes are planned to be tested on an FPGA
platform available within Cadence.

---
Changes for v5
        - Header and code files separated for library functions(common
          functions used by both architectures) and Legacy and HPA.
        - Few new files added as part of refactoring
        - No checks for "is_hpa" as the functions have been separated
          out
        - Review comments from previous patches have been addressed
        - Add region 0 for ECAM and region 1 for message.
        - Add CIX sky1 PCIe drivers. Submissions based on the following v9 patches:
        https://patchwork.kernel.org/project/linux-arm-kernel/cover/20250609031627.1605851-1-peter.chen@cixtech.com/

        Cix Sky1 base dts review link to show its review status:
        https://lore.kernel.org/all/20250609031627.1605851-9-peter.chen@cixtech.com/

        The test log on the Orion O6 board is as follows:
        root@...-localhost:~# lspci
        0000:c0:00.0 PCI bridge: Device 1f6c:0001
        0000:c1:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8126 (rev 01)
        0001:90:00.0 PCI bridge: Device 1f6c:0001
        0001:91:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO
        0002:60:00.0 PCI bridge: Device 1f6c:0001
        0002:61:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8852BE PCIe 802.11ax Wireless Network Controller
        0003:00:00.0 PCI bridge: Device 1f6c:0001
        0003:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8126 (rev 01)
        0004:30:00.0 PCI bridge: Device 1f6c:0001
        0004:31:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8126 (rev 01)
        root@...-localhost:~# uname -a
        Linux cix-localhost 6.16.0-rc1-00023-gbaa962a95a28 #138 SMP PREEMPT Fri Jun 27 16:43:41 CST 2025 aarch64 GNU/Linux
        root@...-localhost:~# cat /etc/issue
        Debian GNU/Linux 12 \n \l
 
Changes for v4
        - Add header file bitfield.h to pcie-cadence.h
        - Addressed the following review comments
                Merged the TI patch as it
                Removed initialization of struct variables to '0'

Changes for v3
        - Patch version v3 added to the subject
        - Use HPA tag for architecture descriptions
        - Remove bug related changes to be submitted later as a separate
          patch
        - Two patches merged from the last series to ensure readability to
          address the review comments
        - Fix several description related issues, coding style issues and
          some misleading comments
        - Remove cpu_addr_fixup() functions

Hans Zhang (5):
  dt-bindings: PCI: Add CIX Sky1 PCIe Root Complex bindings
  PCI: sky1: Add PCIe host support for CIX Sky1
  MAINTAINERS: add entry for CIX Sky1 PCIe driver
  arm64: dts: cix: Add PCIe Root Complex on sky1
  arm64: dts: cix: Enable PCIe on the Orion O6 board

Manikandan K Pillai (9):
  dt-bindings: pci: cadence: Extend compatible for new RP configuration
  dt-bindings: pci: cadence: Extend compatible for new EP configuration
  PCI: cadence: Split PCIe controller header file
  PCI: cadence: Add register definitions for HPA(High Perf Architecture)
  PCI: cadence: Split PCIe EP support into common and specific functions
  PCI: cadence: Split PCIe RP support into common and specific functions
  PCI: cadence: Split the common functions for PCIE controller support
  PCI: cadence: Add support for High Performance Arch(HPA) controller
  PCI: cadence: Add support for PCIe HPA controller platform

 .../bindings/pci/cdns,cdns-pcie-ep.yaml       |   6 +-
 .../bindings/pci/cdns,cdns-pcie-host.yaml     |   6 +-
 .../bindings/pci/cix,sky1-pcie-host.yaml      | 133 ++++
 MAINTAINERS                                   |   7 +
 arch/arm64/boot/dts/cix/sky1-orion-o6.dts     |  20 +
 arch/arm64/boot/dts/cix/sky1.dtsi             | 150 +++++
 drivers/pci/controller/cadence/Kconfig        |  29 +
 drivers/pci/controller/cadence/Makefile       |  10 +-
 drivers/pci/controller/cadence/pci-sky1.c     | 435 +++++++++++++
 .../controller/cadence/pcie-cadence-common.c  | 134 ++++
 .../cadence/pcie-cadence-ep-common.c          | 240 +++++++
 .../cadence/pcie-cadence-ep-common.h          |  36 ++
 .../controller/cadence/pcie-cadence-ep-hpa.c  | 523 ++++++++++++++++
 .../pci/controller/cadence/pcie-cadence-ep.c  | 243 +-------
 .../cadence/pcie-cadence-host-common.c        | 169 +++++
 .../cadence/pcie-cadence-host-common.h        |  25 +
 .../cadence/pcie-cadence-host-hpa.c           | 584 ++++++++++++++++++
 .../controller/cadence/pcie-cadence-host.c    | 156 +----
 .../cadence/pcie-cadence-hpa-regs.h           | 212 +++++++
 .../pci/controller/cadence/pcie-cadence-hpa.c | 199 ++++++
 .../cadence/pcie-cadence-lga-regs.h           | 228 +++++++
 .../cadence/pcie-cadence-plat-hpa.c           | 183 ++++++
 .../controller/cadence/pcie-cadence-plat.c    |  23 +-
 drivers/pci/controller/cadence/pcie-cadence.c | 138 +----
 drivers/pci/controller/cadence/pcie-cadence.h | 416 ++++++-------
 25 files changed, 3524 insertions(+), 781 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/cix,sky1-pcie-host.yaml
 create mode 100644 drivers/pci/controller/cadence/pci-sky1.c
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-common.c
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-ep-common.c
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-ep-common.h
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-ep-hpa.c
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-host-common.c
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-host-common.h
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-host-hpa.c
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-hpa-regs.h
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-hpa.c
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-lga-regs.h
 create mode 100644 drivers/pci/controller/cadence/pcie-cadence-plat-hpa.c


base-commit: 5da173292645ab241a9ccc95044a0b56c2efc214
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ