diff options
author | Ganesan Ramalingam <ganesanr@broadcom.com> | 2014-05-09 07:05:49 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-30 10:51:02 -0400 |
commit | d66f3f0e10b49df8d0cc0d8eb5bf2ef9863a33cf (patch) | |
tree | 39f0d8fa0dacfd9f7ab7794bbdd330160af173c9 /arch/mips/include/asm/netlogic | |
parent | 1c98398662c9b4e2f03f64344f83dd6cb14e0420 (diff) |
MIPS: Add MSI support for XLP9XX
In XLP9XX, the interrupt routing table for MSI-X has been moved to the
PCIe controller's config space from PIC. There are also 32 MSI-X
interrupts available per link on XLP9XX.
Update XLP MSI/MSI-X code to handle this.
Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com>
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: g@linux-mips.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6912/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/netlogic')
-rw-r--r-- | arch/mips/include/asm/netlogic/xlp-hal/pcibus.h | 14 | ||||
-rw-r--r-- | arch/mips/include/asm/netlogic/xlp-hal/pic.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/netlogic/xlp-hal/xlp.h | 5 |
3 files changed, 21 insertions, 2 deletions
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h b/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h index d4deb87ad069..91540f41e1e4 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h | |||
@@ -69,6 +69,20 @@ | |||
69 | #define PCIE_9XX_BYTE_SWAP_IO_BASE 0x25e | 69 | #define PCIE_9XX_BYTE_SWAP_IO_BASE 0x25e |
70 | #define PCIE_9XX_BYTE_SWAP_IO_LIM 0x25f | 70 | #define PCIE_9XX_BYTE_SWAP_IO_LIM 0x25f |
71 | 71 | ||
72 | #define PCIE_9XX_BRIDGE_MSIX_ADDR_BASE 0x264 | ||
73 | #define PCIE_9XX_BRIDGE_MSIX_ADDR_LIMIT 0x265 | ||
74 | #define PCIE_9XX_MSI_STATUS 0x283 | ||
75 | #define PCIE_9XX_MSI_EN 0x284 | ||
76 | /* 128 MSIX vectors available in 9xx */ | ||
77 | #define PCIE_9XX_MSIX_STATUS0 0x286 | ||
78 | #define PCIE_9XX_MSIX_STATUSX(n) (n + 0x286) | ||
79 | #define PCIE_9XX_MSIX_VEC 0x296 | ||
80 | #define PCIE_9XX_MSIX_VECX(n) (n + 0x296) | ||
81 | #define PCIE_9XX_INT_STATUS0 0x397 | ||
82 | #define PCIE_9XX_INT_STATUS1 0x398 | ||
83 | #define PCIE_9XX_INT_EN0 0x399 | ||
84 | #define PCIE_9XX_INT_EN1 0x39a | ||
85 | |||
72 | /* other */ | 86 | /* other */ |
73 | #define PCIE_NLINKS 4 | 87 | #define PCIE_NLINKS 4 |
74 | 88 | ||
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/pic.h b/arch/mips/include/asm/netlogic/xlp-hal/pic.h index f10bf3bba58f..41cefe94f0c9 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/pic.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/pic.h | |||
@@ -199,6 +199,10 @@ | |||
199 | #define PIC_IRT_PCIE_LINK_3_INDEX 81 | 199 | #define PIC_IRT_PCIE_LINK_3_INDEX 81 |
200 | #define PIC_IRT_PCIE_LINK_INDEX(num) ((num) + PIC_IRT_PCIE_LINK_0_INDEX) | 200 | #define PIC_IRT_PCIE_LINK_INDEX(num) ((num) + PIC_IRT_PCIE_LINK_0_INDEX) |
201 | 201 | ||
202 | #define PIC_9XX_IRT_PCIE_LINK_0_INDEX 191 | ||
203 | #define PIC_9XX_IRT_PCIE_LINK_INDEX(num) \ | ||
204 | ((num) + PIC_9XX_IRT_PCIE_LINK_0_INDEX) | ||
205 | |||
202 | #define PIC_CLOCK_TIMER 7 | 206 | #define PIC_CLOCK_TIMER 7 |
203 | 207 | ||
204 | #if !defined(LOCORE) && !defined(__ASSEMBLY__) | 208 | #if !defined(LOCORE) && !defined(__ASSEMBLY__) |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h index 62d19871b983..a862b93223cc 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h | |||
@@ -70,8 +70,9 @@ | |||
70 | #define PIC_PCIE_MSIX_IRQ_BASE 48 /* 48 - 51 MSI-X IRQ */ | 70 | #define PIC_PCIE_MSIX_IRQ_BASE 48 /* 48 - 51 MSI-X IRQ */ |
71 | #define PIC_PCIE_MSIX_IRQ(i) (48 + (i)) | 71 | #define PIC_PCIE_MSIX_IRQ(i) (48 + (i)) |
72 | 72 | ||
73 | #define NLM_MSIX_VEC_BASE 96 /* 96 - 127 - MSIX mapped */ | 73 | /* XLP9xx and XLP8xx has 128 and 32 MSIX vectors respectively */ |
74 | #define NLM_MSI_VEC_BASE 128 /* 128 -255 - MSI mapped */ | 74 | #define NLM_MSIX_VEC_BASE 96 /* 96 - 223 - MSIX mapped */ |
75 | #define NLM_MSI_VEC_BASE 224 /* 224 -351 - MSI mapped */ | ||
75 | 76 | ||
76 | #define NLM_PIC_INDIRECT_VEC_BASE 512 | 77 | #define NLM_PIC_INDIRECT_VEC_BASE 512 |
77 | #define NLM_GPIO_VEC_BASE 768 | 78 | #define NLM_GPIO_VEC_BASE 768 |