Skip to content

Commit 73ce5ba

Browse files
aspeedJackyMani-Sadhasivam
authored andcommitted
PCI: Add FMT, TYPE and CPL status definition for TLP header
According to PCIe specification, add FMT, TYPE and CPL status definition for TLP header. Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20251216-upstream_pcie_rc-v7-5-4aeb0f53c4ce@aspeedtech.com
1 parent a20df1a commit 73ce5ba

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

drivers/pci/pci.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ struct pcie_tlp_log;
6363
#define PCIE_LINK_WAIT_MAX_RETRIES 10
6464
#define PCIE_LINK_WAIT_SLEEP_MS 90
6565

66+
/* Format of TLP; PCIe r7.0, sec 2.2.1 */
67+
#define PCIE_TLP_FMT_3DW_NO_DATA 0x00 /* 3DW header, no data */
68+
#define PCIE_TLP_FMT_4DW_NO_DATA 0x01 /* 4DW header, no data */
69+
#define PCIE_TLP_FMT_3DW_DATA 0x02 /* 3DW header, with data */
70+
#define PCIE_TLP_FMT_4DW_DATA 0x03 /* 4DW header, with data */
71+
72+
/* Type of TLP; PCIe r7.0, sec 2.2.1 */
73+
#define PCIE_TLP_TYPE_CFG0_RD 0x04 /* Config Type 0 Read Request */
74+
#define PCIE_TLP_TYPE_CFG0_WR 0x04 /* Config Type 0 Write Request */
75+
#define PCIE_TLP_TYPE_CFG1_RD 0x05 /* Config Type 1 Read Request */
76+
#define PCIE_TLP_TYPE_CFG1_WR 0x05 /* Config Type 1 Write Request */
77+
6678
/* Message Routing (r[2:0]); PCIe r6.0, sec 2.2.8 */
6779
#define PCIE_MSG_TYPE_R_RC 0
6880
#define PCIE_MSG_TYPE_R_ADDR 1
@@ -84,6 +96,9 @@ struct pcie_tlp_log;
8496
#define PCIE_MSG_CODE_DEASSERT_INTC 0x26
8597
#define PCIE_MSG_CODE_DEASSERT_INTD 0x27
8698

99+
/* Cpl. status of Complete; PCIe r7.0, sec 2.2.9.1 */
100+
#define PCIE_CPL_STS_SUCCESS 0x00 /* Successful Completion */
101+
87102
#define PCI_BUS_BRIDGE_IO_WINDOW 0
88103
#define PCI_BUS_BRIDGE_MEM_WINDOW 1
89104
#define PCI_BUS_BRIDGE_PREF_MEM_WINDOW 2

0 commit comments

Comments
 (0)