[PATCH 0/2] PCI: dwc: Clean up DWC PCIe register macros
From: Hans Zhang <18255117159@163.com>
Date: 2026-09-11 16:26:47
Also in:
linux-amlogic, linux-pci, linux-rockchip, lkml
This series cleans up the DWC PCIe controller register macros to better match the Synopsys DesignWare PCIe Controller Reference Manual, and removes an unused set of iATU unroll register definitions. Patch 1 renames various register and field macros, dropping redundant PCIE_ prefixes and using documented base names. Field macros are renamed consistently so their register association is clear. No functional change intended. Patch 2 removes the unused PCIE_ATU_UNR_* macros. These have no remaining users now that the driver uses the ATU_* macros and ATU_UNROLL_BASE() for unrolled iATU register access. The series was build-tested with defconfig and allmodconfig. --- Changes in v2: - Rename Port Link Control register to PORT_LINK_CTRL instead of PORT_LINK_CTRL_OFF, as suggested by Bjorn. The _OFF suffix is ambiguous and unnecessary. - Extend the cleanup to more DWC PCIe register macros, dropping the redundant PCIE_ prefix and using documented base names, such as PORT_FORCE_LINK, PORT_AFAC, PORT_LANE_SKEW, TIMER_CTRL_MAX_FUNC_NUM, PORT_LINK_DEBUG0/1, LINK_WIDTH_SPEED_CTRL, GEN3_CTRL, GEN3_EQ_CTRL, MULTI_LANE_CTRL, MISC_CONTROL_1, MSIX_DOORBELL, and the ATU_* registers. - Include the register name in field macros, e.g. PORT_LINK_CTRL_DLE, PORT_LINK_CTRL_FLM, PORT_LINK_CTRL_LC_*. - Fix PORT_AFAC L1 field names (PORT_AFAC_L1_*). - Unify COHERENCY_CTRL1/2/3 and RAS_DES_EVENT_COUNTER_* naming. - Drop the _OFF suffix from MISC_CONTROL_1. - Add a patch to remove unused PCIE_ATU_UNR_* definitions. v1: https://patchwork.kernel.org/project/linux-pci/patch/20260904061823.592216-1-18255117159@163.com/ --- Hans Zhang (2): PCI: dwc: Align register macros with Synopsys documentation PCI: dwc: Remove unused PCIE_ATU_UNR_* register definitions drivers/pci/controller/dwc/pci-imx6.c | 26 +- drivers/pci/controller/dwc/pci-keystone.c | 4 +- .../pci/controller/dwc/pcie-designware-ep.c | 10 +- .../pci/controller/dwc/pcie-designware-host.c | 18 +- drivers/pci/controller/dwc/pcie-designware.c | 176 +++++------ drivers/pci/controller/dwc/pcie-designware.h | 275 +++++++++--------- drivers/pci/controller/dwc/pcie-fu740.c | 6 +- drivers/pci/controller/dwc/pcie-nxp-s32g.c | 18 +- drivers/pci/controller/dwc/pcie-qcom-common.c | 28 +- drivers/pci/controller/dwc/pcie-qcom.c | 6 +- drivers/pci/controller/dwc/pcie-rcar-gen4.c | 26 +- .../pci/controller/dwc/pcie-tegra194-acpi.c | 22 +- drivers/pci/controller/dwc/pcie-tegra194.c | 86 +++--- drivers/pci/controller/dwc/pcie-ultrarisc.c | 10 +- 14 files changed, 349 insertions(+), 362 deletions(-) base-commit: 08df884136f1c1197bab2a27814404fd329d9aac -- 2.34.1