]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI: Add common TLP type macros and convert aspeed/mediatek
authorHans Zhang <18255117159@163.com>
Sat, 16 May 2026 15:36:55 +0000 (23:36 +0800)
committerManivannan Sadhasivam <mani@kernel.org>
Tue, 9 Jun 2026 13:54:27 +0000 (19:24 +0530)
commit286db45fb7ef5fe950a60a47c963156d6ece356f
treeecdf334349c602c7cd0f98d90a0d2002ff447435
parent254f49634ee16a731174d2ae34bc50bd5f45e731
PCI: Add common TLP type macros and convert aspeed/mediatek

Introduce a set of unified TLP type macros in pci.h according to PCIe
spec r7.0, sec 2.2.1:

  - PCIE_TLP_TYPE_MEM_RDWR   (0x00) for Memory Read/Write
  - PCIE_TLP_TYPE_IO_RDWR    (0x02) for I/O Read/Write
  - PCIE_TLP_TYPE_CFG0_RDWR  (0x04) for Type 0 Config Read/Write
  - PCIE_TLP_TYPE_CFG1_RDWR  (0x05) for Type 1 Config Read/Write
  - PCIE_TLP_TYPE_MSG        (0x10) for Message Request (routing to RC)

These replace the old per-driver hardcoded values or local macros, and
also replace the previous PCIE_TLP_TYPE_CFG0_RD/WR and
PCIE_TLP_TYPE_CFG1_RD/WR definitions which had identical numeric values.
The read/write distinction is already handled by the TLP Format field
(Fmt), so a single type macro suffices.

Convert the aspeed and mediatek drivers to use the new macros, and remove
the obsolete definitions from pci.h.

No functional change intended.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20260516153657.65214-2-18255117159@163.com
drivers/pci/controller/pcie-aspeed.c
drivers/pci/controller/pcie-mediatek.c
drivers/pci/pci.h