]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: cadence: Replace private message routing enums with PCI core definitions
authorHans Zhang <18255117159@163.com>
Sat, 7 Jun 2025 15:49:12 +0000 (23:49 +0800)
committerManivannan Sadhasivam <mani@kernel.org>
Thu, 19 Jun 2025 12:50:39 +0000 (18:20 +0530)
The Cadence driver previously defined its own message routing enums (e.g.,
MSG_ROUTING_LOCAL) and message codes, which duplicated existing PCI core
macros (PCIE_MSG_TYPE_R_LOCAL, PCIE_MSG_CODE_ASSERT_INTA, etc.) in
drivers/pci/pci.h. These core definitions align with the PCIe r6.0 spec.

Remove the driver-specific enums and switch to the centralized PCI core
macros. This eliminates redundancy, ensures consistency, and simplifies
future updates. No functional changes are introduced.

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

index 8ab6cf70c18eb30299380b590a9132d7e00068a8..77c5a19b2ab1cc473c9b8e42605c1d379b6dfd68 100644 (file)
@@ -353,7 +353,7 @@ static void cdns_pcie_ep_assert_intx(struct cdns_pcie_ep *ep, u8 fn, u8 intx,
        }
        spin_unlock_irqrestore(&ep->lock, flags);
 
-       offset = CDNS_PCIE_NORMAL_MSG_ROUTING(MSG_ROUTING_LOCAL) |
+       offset = CDNS_PCIE_NORMAL_MSG_ROUTING(PCIE_MSG_TYPE_R_LOCAL) |
                 CDNS_PCIE_NORMAL_MSG_CODE(msg_code);
        writel(0, ep->irq_cpu_addr + offset);
 }
index a149845d341ae4b314acc4d384599d5f4669a5f3..1d81c4bf6c6db7844816f01490e53f3a3d6b8c27 100644 (file)
@@ -250,26 +250,6 @@ struct cdns_pcie_rp_ib_bar {
 
 struct cdns_pcie;
 
-enum cdns_pcie_msg_routing {
-       /* Route to Root Complex */
-       MSG_ROUTING_TO_RC,
-
-       /* Use Address Routing */
-       MSG_ROUTING_BY_ADDR,
-
-       /* Use ID Routing */
-       MSG_ROUTING_BY_ID,
-
-       /* Route as Broadcast Message from Root Complex */
-       MSG_ROUTING_BCAST,
-
-       /* Local message; terminate at receiver (INTx messages) */
-       MSG_ROUTING_LOCAL,
-
-       /* Gather & route to Root Complex (PME_TO_Ack message) */
-       MSG_ROUTING_GATHER,
-};
-
 struct cdns_pcie_ops {
        int     (*start_link)(struct cdns_pcie *pcie);
        void    (*stop_link)(struct cdns_pcie *pcie);