[PATCH 1/2] PCI: dwc: Align register macros with Synopsys documentation

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Sep 11 09:34:38 PDT 2026


> The DWC PCIe register and field macros are inconsistently named and
> often do not match the Synopsys DesignWare PCIe Controller Reference
> Manual.  This makes it harder to cross-reference the code with the
> documentation when debugging or maintaining the driver.
> 
> As suggested during review, do not add an "_OFF" suffix to the Port Link
> Control register: the suffix is ambiguous (offset vs. off) and
> unnecessary.  Use PORT_LINK_CTRL, and include the register name in its
> field macros, e.g. PORT_LINK_CTRL_DLE, PORT_LINK_CTRL_FLM, and
> PORT_LINK_CTRL_LC_*.
> 
> Align other DWC PCIe controller-internal register macros in the same
> spirit by dropping the redundant PCIE_ prefix and using the 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.  Field macros are renamed
> consistently so their register association is clear.
> 
> This improves code maintainability and eases future reference to the
> controller manual.
> 
> No functional change intended.
> 
> Co-developed-by: Feizhou Yu <yufeizhou201 at 163.com>
> Signed-off-by: Feizhou Yu <yufeizhou201 at 163.com>
> Signed-off-by: Hans Zhang <18255117159 at 163.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260911162537.469018-1-18255117159@163.com?part=1




More information about the linux-amlogic mailing list