Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Zhang <18255117159@163.com>
To: lpieralisi@kernel.org, kwilczynski@kernel.org,
	bhelgaas@google.com, helgaas@kernel.org, heiko@sntech.de,
	mani@kernel.org, yue.wang@Amlogic.com
Cc: pali@kernel.org, neil.armstrong@linaro.org, robh@kernel.org,
	jingoohan1@gmail.com, khilman@baylibre.com, jbrunet@baylibre.com,
	martin.blumenstingl@googlemail.com, cassel@kernel.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	Hans Zhang <18255117159@163.com>
Subject: [PATCH 0/2] PCI: dwc: Clean up DWC PCIe register macros
Date: Sat, 12 Sep 2026 00:25:35 +0800	[thread overview]
Message-ID: <20260911162537.469018-1-18255117159@163.com> (raw)

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



             reply	other threads:[~2026-09-11 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 16:25 Hans Zhang [this message]
2026-09-11 16:25 ` [PATCH 1/2] PCI: dwc: Align register macros with Synopsys documentation Hans Zhang
2026-09-11 16:25 ` [PATCH 2/2] PCI: dwc: Remove unused PCIE_ATU_UNR_* register definitions Hans Zhang

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=20260911162537.469018-1-18255117159@163.com \
    --to=18255117159@163.com \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=heiko@sntech.de \
    --cc=helgaas@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=jingoohan1@gmail.com \
    --cc=khilman@baylibre.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=pali@kernel.org \
    --cc=robh@kernel.org \
    --cc=yue.wang@Amlogic.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox