15b3b1688SDavid Daney /* 25b3b1688SDavid Daney * This file is subject to the terms and conditions of the GNU General Public 35b3b1688SDavid Daney * License. See the file "COPYING" in the main directory of this archive 45b3b1688SDavid Daney * for more details. 55b3b1688SDavid Daney * 65b3b1688SDavid Daney * Copyright (C) 2004-2008 Cavium Networks 75b3b1688SDavid Daney */ 85b3b1688SDavid Daney #ifndef __OCTEON_IRQ_H__ 95b3b1688SDavid Daney #define __OCTEON_IRQ_H__ 105b3b1688SDavid Daney 115b3b1688SDavid Daney #define NR_IRQS OCTEON_IRQ_LAST 125b3b1688SDavid Daney #define MIPS_CPU_IRQ_BASE OCTEON_IRQ_SW0 135b3b1688SDavid Daney 145b3b1688SDavid Daney /* 0 - 7 represent the i8259 master */ 155b3b1688SDavid Daney #define OCTEON_IRQ_I8259M0 0 165b3b1688SDavid Daney #define OCTEON_IRQ_I8259M1 1 175b3b1688SDavid Daney #define OCTEON_IRQ_I8259M2 2 185b3b1688SDavid Daney #define OCTEON_IRQ_I8259M3 3 195b3b1688SDavid Daney #define OCTEON_IRQ_I8259M4 4 205b3b1688SDavid Daney #define OCTEON_IRQ_I8259M5 5 215b3b1688SDavid Daney #define OCTEON_IRQ_I8259M6 6 225b3b1688SDavid Daney #define OCTEON_IRQ_I8259M7 7 235b3b1688SDavid Daney /* 8 - 15 represent the i8259 slave */ 245b3b1688SDavid Daney #define OCTEON_IRQ_I8259S0 8 255b3b1688SDavid Daney #define OCTEON_IRQ_I8259S1 9 265b3b1688SDavid Daney #define OCTEON_IRQ_I8259S2 10 275b3b1688SDavid Daney #define OCTEON_IRQ_I8259S3 11 285b3b1688SDavid Daney #define OCTEON_IRQ_I8259S4 12 295b3b1688SDavid Daney #define OCTEON_IRQ_I8259S5 13 305b3b1688SDavid Daney #define OCTEON_IRQ_I8259S6 14 315b3b1688SDavid Daney #define OCTEON_IRQ_I8259S7 15 325b3b1688SDavid Daney /* 16 - 23 represent the 8 MIPS standard interrupt sources */ 335b3b1688SDavid Daney #define OCTEON_IRQ_SW0 16 345b3b1688SDavid Daney #define OCTEON_IRQ_SW1 17 355b3b1688SDavid Daney #define OCTEON_IRQ_CIU0 18 365b3b1688SDavid Daney #define OCTEON_IRQ_CIU1 19 375b3b1688SDavid Daney #define OCTEON_IRQ_CIU4 20 385b3b1688SDavid Daney #define OCTEON_IRQ_5 21 395b3b1688SDavid Daney #define OCTEON_IRQ_PERF 22 405b3b1688SDavid Daney #define OCTEON_IRQ_TIMER 23 415b3b1688SDavid Daney /* 24 - 87 represent the sources in CIU_INTX_EN0 */ 425b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ0 24 435b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ1 25 445b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ2 26 455b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ3 27 465b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ4 28 475b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ5 29 485b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ6 30 495b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ7 31 505b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ8 32 515b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ9 33 525b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ10 34 535b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ11 35 545b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ12 36 555b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ13 37 565b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ14 38 575b3b1688SDavid Daney #define OCTEON_IRQ_WORKQ15 39 585b3b1688SDavid Daney #define OCTEON_IRQ_GPIO0 40 595b3b1688SDavid Daney #define OCTEON_IRQ_GPIO1 41 605b3b1688SDavid Daney #define OCTEON_IRQ_GPIO2 42 615b3b1688SDavid Daney #define OCTEON_IRQ_GPIO3 43 625b3b1688SDavid Daney #define OCTEON_IRQ_GPIO4 44 635b3b1688SDavid Daney #define OCTEON_IRQ_GPIO5 45 645b3b1688SDavid Daney #define OCTEON_IRQ_GPIO6 46 655b3b1688SDavid Daney #define OCTEON_IRQ_GPIO7 47 665b3b1688SDavid Daney #define OCTEON_IRQ_GPIO8 48 675b3b1688SDavid Daney #define OCTEON_IRQ_GPIO9 49 685b3b1688SDavid Daney #define OCTEON_IRQ_GPIO10 50 695b3b1688SDavid Daney #define OCTEON_IRQ_GPIO11 51 705b3b1688SDavid Daney #define OCTEON_IRQ_GPIO12 52 715b3b1688SDavid Daney #define OCTEON_IRQ_GPIO13 53 725b3b1688SDavid Daney #define OCTEON_IRQ_GPIO14 54 735b3b1688SDavid Daney #define OCTEON_IRQ_GPIO15 55 745b3b1688SDavid Daney #define OCTEON_IRQ_MBOX0 56 755b3b1688SDavid Daney #define OCTEON_IRQ_MBOX1 57 765b3b1688SDavid Daney #define OCTEON_IRQ_UART0 58 775b3b1688SDavid Daney #define OCTEON_IRQ_UART1 59 785b3b1688SDavid Daney #define OCTEON_IRQ_PCI_INT0 60 795b3b1688SDavid Daney #define OCTEON_IRQ_PCI_INT1 61 805b3b1688SDavid Daney #define OCTEON_IRQ_PCI_INT2 62 815b3b1688SDavid Daney #define OCTEON_IRQ_PCI_INT3 63 825b3b1688SDavid Daney #define OCTEON_IRQ_PCI_MSI0 64 835b3b1688SDavid Daney #define OCTEON_IRQ_PCI_MSI1 65 845b3b1688SDavid Daney #define OCTEON_IRQ_PCI_MSI2 66 855b3b1688SDavid Daney #define OCTEON_IRQ_PCI_MSI3 67 865b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED68 68 /* Summary of CIU_INT_SUM1 */ 875b3b1688SDavid Daney #define OCTEON_IRQ_TWSI 69 885b3b1688SDavid Daney #define OCTEON_IRQ_RML 70 895b3b1688SDavid Daney #define OCTEON_IRQ_TRACE 71 905b3b1688SDavid Daney #define OCTEON_IRQ_GMX_DRP0 72 915b3b1688SDavid Daney #define OCTEON_IRQ_GMX_DRP1 73 925b3b1688SDavid Daney #define OCTEON_IRQ_IPD_DRP 74 935b3b1688SDavid Daney #define OCTEON_IRQ_KEY_ZERO 75 945b3b1688SDavid Daney #define OCTEON_IRQ_TIMER0 76 955b3b1688SDavid Daney #define OCTEON_IRQ_TIMER1 77 965b3b1688SDavid Daney #define OCTEON_IRQ_TIMER2 78 975b3b1688SDavid Daney #define OCTEON_IRQ_TIMER3 79 985b3b1688SDavid Daney #define OCTEON_IRQ_USB0 80 995b3b1688SDavid Daney #define OCTEON_IRQ_PCM 81 1005b3b1688SDavid Daney #define OCTEON_IRQ_MPI 82 1015b3b1688SDavid Daney #define OCTEON_IRQ_TWSI2 83 1025b3b1688SDavid Daney #define OCTEON_IRQ_POWIQ 84 1035b3b1688SDavid Daney #define OCTEON_IRQ_IPDPPTHR 85 1045b3b1688SDavid Daney #define OCTEON_IRQ_MII0 86 1055b3b1688SDavid Daney #define OCTEON_IRQ_BOOTDMA 87 1065b3b1688SDavid Daney /* 88 - 151 represent the sources in CIU_INTX_EN1 */ 1075b3b1688SDavid Daney #define OCTEON_IRQ_WDOG0 88 1085b3b1688SDavid Daney #define OCTEON_IRQ_WDOG1 89 1095b3b1688SDavid Daney #define OCTEON_IRQ_WDOG2 90 1105b3b1688SDavid Daney #define OCTEON_IRQ_WDOG3 91 1115b3b1688SDavid Daney #define OCTEON_IRQ_WDOG4 92 1125b3b1688SDavid Daney #define OCTEON_IRQ_WDOG5 93 1135b3b1688SDavid Daney #define OCTEON_IRQ_WDOG6 94 1145b3b1688SDavid Daney #define OCTEON_IRQ_WDOG7 95 1155b3b1688SDavid Daney #define OCTEON_IRQ_WDOG8 96 1165b3b1688SDavid Daney #define OCTEON_IRQ_WDOG9 97 1175b3b1688SDavid Daney #define OCTEON_IRQ_WDOG10 98 1185b3b1688SDavid Daney #define OCTEON_IRQ_WDOG11 99 1195b3b1688SDavid Daney #define OCTEON_IRQ_WDOG12 100 1205b3b1688SDavid Daney #define OCTEON_IRQ_WDOG13 101 1215b3b1688SDavid Daney #define OCTEON_IRQ_WDOG14 102 1225b3b1688SDavid Daney #define OCTEON_IRQ_WDOG15 103 1235b3b1688SDavid Daney #define OCTEON_IRQ_UART2 104 1245b3b1688SDavid Daney #define OCTEON_IRQ_USB1 105 1255b3b1688SDavid Daney #define OCTEON_IRQ_MII1 106 1265b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED107 107 1275b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED108 108 1285b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED109 109 1295b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED110 110 1305b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED111 111 1315b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED112 112 1325b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED113 113 1335b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED114 114 1345b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED115 115 1355b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED116 116 1365b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED117 117 1375b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED118 118 1385b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED119 119 1395b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED120 120 1405b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED121 121 1415b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED122 122 1425b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED123 123 1435b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED124 124 1445b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED125 125 1455b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED126 126 1465b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED127 127 1475b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED128 128 1485b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED129 129 1495b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED130 130 1505b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED131 131 1515b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED132 132 1525b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED133 133 1535b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED134 134 1545b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED135 135 1555b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED136 136 1565b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED137 137 1575b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED138 138 1585b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED139 139 1595b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED140 140 1605b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED141 141 1615b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED142 142 1625b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED143 143 1635b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED144 144 1645b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED145 145 1655b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED146 146 1665b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED147 147 1675b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED148 148 1685b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED149 149 1695b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED150 150 1705b3b1688SDavid Daney #define OCTEON_IRQ_RESERVED151 151 1715b3b1688SDavid Daney 1725b3b1688SDavid Daney #ifdef CONFIG_PCI_MSI 1735b3b1688SDavid Daney /* 152 - 215 represent the MSI interrupts 0-63 */ 1745b3b1688SDavid Daney #define OCTEON_IRQ_MSI_BIT0 152 175a5decf70SDavid Daney #define OCTEON_IRQ_MSI_LAST (OCTEON_IRQ_MSI_BIT0 + 63) 1765b3b1688SDavid Daney 177a5decf70SDavid Daney #define OCTEON_IRQ_LAST (OCTEON_IRQ_MSI_LAST + 1) 1785b3b1688SDavid Daney #else 1795b3b1688SDavid Daney #define OCTEON_IRQ_LAST 152 1805b3b1688SDavid Daney #endif 1815b3b1688SDavid Daney 1825b3b1688SDavid Daney #endif 183