MIPS: Netlogic: Add MSI support for XLP
Add MSI chip and MSIX chip definitions. For MSI, we map the link interrupt to a MSI link IRQ which will do a second level of dispatch based on the MSI status register. The MSI chip definitions use the MSI enable register to enable and disable the MSI irqs. For MSI-X, we split the 32 available MSI-X vectors across the four PCIe links (8 each). These PIC interrupts generate an IRQ per link which uses a second level dispatch as well. The MSI-X chip definition uses the standard functions to enable and disable interrupts. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6270/
This commit is contained in:

committed by
Ralf Baechle

parent
27547abf36
commit
c24a8a7a99
@@ -135,9 +135,17 @@ int nlm_irq_to_irt(int irq)
|
||||
case PIC_I2C_3_IRQ:
|
||||
irt = irt + 3; break;
|
||||
}
|
||||
} else if (irq >= PIC_PCIE_LINK_0_IRQ && irq <= PIC_PCIE_LINK_3_IRQ) {
|
||||
} else if (irq >= PIC_PCIE_LINK_LEGACY_IRQ(0) &&
|
||||
irq <= PIC_PCIE_LINK_LEGACY_IRQ(3)) {
|
||||
/* HW bug, PCI IRT entries are bad on early silicon, fix */
|
||||
irt = PIC_IRT_PCIE_LINK_INDEX(irq - PIC_PCIE_LINK_0_IRQ);
|
||||
irt = PIC_IRT_PCIE_LINK_INDEX(irq -
|
||||
PIC_PCIE_LINK_LEGACY_IRQ_BASE);
|
||||
} else if (irq >= PIC_PCIE_LINK_MSI_IRQ(0) &&
|
||||
irq <= PIC_PCIE_LINK_MSI_IRQ(3)) {
|
||||
irt = -2;
|
||||
} else if (irq >= PIC_PCIE_MSIX_IRQ(0) &&
|
||||
irq <= PIC_PCIE_MSIX_IRQ(3)) {
|
||||
irt = -2;
|
||||
} else {
|
||||
irt = -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user