it8172_int.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. *
  3. * BRIEF MODULE DESCRIPTION
  4. * ITE 8172 Interrupt Numbering
  5. *
  6. * Copyright 2000 MontaVista Software Inc.
  7. * Author: MontaVista Software, Inc.
  8. * ppopov@mvista.com or source@mvista.com
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at your
  13. * option) any later version.
  14. *
  15. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  16. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  17. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  18. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  19. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  20. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  21. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  22. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  24. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. *
  26. * You should have received a copy of the GNU General Public License along
  27. * with this program; if not, write to the Free Software Foundation, Inc.,
  28. * 675 Mass Ave, Cambridge, MA 02139, USA.
  29. */
  30. #ifndef _MIPS_ITEINT_H
  31. #define _MIPS_ITEINT_H
  32. /*
  33. * Here's the "strategy":
  34. * We number the LPC serial irqs from 0 to 15,
  35. * the local bus irqs from 16 to 31,
  36. * the pci dev register interrupts from 32 to 47,
  37. * and the non-maskable ints from 48 to 53.
  38. */
  39. #define IT8172_LPC_IRQ_BASE 0 /* first LPC int number */
  40. #define IT8172_SERIRQ_0 (IT8172_LPC_IRQ_BASE + 0)
  41. #define IT8172_SERIRQ_1 (IT8172_LPC_IRQ_BASE + 1)
  42. #define IT8172_SERIRQ_2 (IT8172_LPC_IRQ_BASE + 2)
  43. #define IT8172_SERIRQ_3 (IT8172_LPC_IRQ_BASE + 3)
  44. #define IT8172_SERIRQ_4 (IT8172_LPC_IRQ_BASE + 4)
  45. #define IT8172_SERIRQ_5 (IT8172_LPC_IRQ_BASE + 5)
  46. #define IT8172_SERIRQ_6 (IT8172_LPC_IRQ_BASE + 6)
  47. #define IT8172_SERIRQ_7 (IT8172_LPC_IRQ_BASE + 7)
  48. #define IT8172_SERIRQ_8 (IT8172_LPC_IRQ_BASE + 8)
  49. #define IT8172_SERIRQ_9 (IT8172_LPC_IRQ_BASE + 9)
  50. #define IT8172_SERIRQ_10 (IT8172_LPC_IRQ_BASE + 10)
  51. #define IT8172_SERIRQ_11 (IT8172_LPC_IRQ_BASE + 11)
  52. #define IT8172_SERIRQ_12 (IT8172_LPC_IRQ_BASE + 12)
  53. #define IT8172_SERIRQ_13 (IT8172_LPC_IRQ_BASE + 13)
  54. #define IT8172_SERIRQ_14 (IT8172_LPC_IRQ_BASE + 14)
  55. #define IT8172_SERIRQ_15 (IT8172_LPC_IRQ_BASE + 15)
  56. #define IT8172_LB_IRQ_BASE 16 /* first local bus int number */
  57. #define IT8172_PPR_IRQ (IT8172_LB_IRQ_BASE + 0) /* parallel port */
  58. #define IT8172_TIMER0_IRQ (IT8172_LB_IRQ_BASE + 1)
  59. #define IT8172_TIMER1_IRQ (IT8172_LB_IRQ_BASE + 2)
  60. #define IT8172_I2C_IRQ (IT8172_LB_IRQ_BASE + 3)
  61. #define IT8172_GPIO_IRQ (IT8172_LB_IRQ_BASE + 4)
  62. #define IT8172_CIR0_IRQ (IT8172_LB_IRQ_BASE + 5)
  63. #define IT8172_CIR1_IRQ (IT8172_LB_IRQ_BASE + 6)
  64. #define IT8172_UART_IRQ (IT8172_LB_IRQ_BASE + 7)
  65. #define IT8172_SCR0_IRQ (IT8172_LB_IRQ_BASE + 8)
  66. #define IT8172_SCR1_IRQ (IT8172_LB_IRQ_BASE + 9)
  67. #define IT8172_RTC_IRQ (IT8172_LB_IRQ_BASE + 10)
  68. #define IT8172_IOCHK_IRQ (IT8172_LB_IRQ_BASE + 11)
  69. /* 12 - 15 reserved */
  70. /*
  71. * Note here that the pci dev registers includes bits for more than
  72. * just the pci devices.
  73. */
  74. #define IT8172_PCI_DEV_IRQ_BASE 32 /* first pci dev irq */
  75. #define IT8172_AC97_IRQ (IT8172_PCI_DEV_IRQ_BASE + 0)
  76. #define IT8172_MC68K_IRQ (IT8172_PCI_DEV_IRQ_BASE + 1)
  77. #define IT8172_IDE_IRQ (IT8172_PCI_DEV_IRQ_BASE + 2)
  78. #define IT8172_USB_IRQ (IT8172_PCI_DEV_IRQ_BASE + 3)
  79. #define IT8172_BRIDGE_MASTER_IRQ (IT8172_PCI_DEV_IRQ_BASE + 4)
  80. #define IT8172_BRIDGE_TARGET_IRQ (IT8172_PCI_DEV_IRQ_BASE + 5)
  81. #define IT8172_PCI_INTA_IRQ (IT8172_PCI_DEV_IRQ_BASE + 6)
  82. #define IT8172_PCI_INTB_IRQ (IT8172_PCI_DEV_IRQ_BASE + 7)
  83. #define IT8172_PCI_INTC_IRQ (IT8172_PCI_DEV_IRQ_BASE + 8)
  84. #define IT8172_PCI_INTD_IRQ (IT8172_PCI_DEV_IRQ_BASE + 9)
  85. #define IT8172_S_INTA_IRQ (IT8172_PCI_DEV_IRQ_BASE + 10)
  86. #define IT8172_S_INTB_IRQ (IT8172_PCI_DEV_IRQ_BASE + 11)
  87. #define IT8172_S_INTC_IRQ (IT8172_PCI_DEV_IRQ_BASE + 12)
  88. #define IT8172_S_INTD_IRQ (IT8172_PCI_DEV_IRQ_BASE + 13)
  89. #define IT8172_CDMA_IRQ (IT8172_PCI_DEV_IRQ_BASE + 14)
  90. #define IT8172_DMA_IRQ (IT8172_PCI_DEV_IRQ_BASE + 15)
  91. #define IT8172_NMI_IRQ_BASE 48
  92. #define IT8172_SER_NMI_IRQ (IT8172_NMI_IRQ_BASE + 0)
  93. #define IT8172_PCI_NMI_IRQ (IT8172_NMI_IRQ_BASE + 1)
  94. #define IT8172_RTC_NMI_IRQ (IT8172_NMI_IRQ_BASE + 2)
  95. #define IT8172_CPUIF_NMI_IRQ (IT8172_NMI_IRQ_BASE + 3)
  96. #define IT8172_PMER_NMI_IRQ (IT8172_NMI_IRQ_BASE + 4)
  97. #define IT8172_POWER_NMI_IRQ (IT8172_NMI_IRQ_BASE + 5)
  98. #define IT8172_LAST_IRQ (IT8172_POWER_NMI_IRQ)
  99. /* Finally, let's move over here the mips cpu timer interrupt.
  100. */
  101. #define MIPS_CPU_TIMER_IRQ (NR_IRQS-1)
  102. /*
  103. * IT8172 Interrupt Controller Registers
  104. */
  105. struct it8172_intc_regs {
  106. volatile unsigned short lb_req; /* offset 0 */
  107. volatile unsigned short lb_mask;
  108. volatile unsigned short lb_trigger;
  109. volatile unsigned short lb_level;
  110. unsigned char pad0[8];
  111. volatile unsigned short lpc_req; /* offset 0x10 */
  112. volatile unsigned short lpc_mask;
  113. volatile unsigned short lpc_trigger;
  114. volatile unsigned short lpc_level;
  115. unsigned char pad1[8];
  116. volatile unsigned short pci_req; /* offset 0x20 */
  117. volatile unsigned short pci_mask;
  118. volatile unsigned short pci_trigger;
  119. volatile unsigned short pci_level;
  120. unsigned char pad2[8];
  121. volatile unsigned short nmi_req; /* offset 0x30 */
  122. volatile unsigned short nmi_mask;
  123. volatile unsigned short nmi_trigger;
  124. volatile unsigned short nmi_level;
  125. unsigned char pad3[6];
  126. volatile unsigned short nmi_redir; /* offset 0x3E */
  127. unsigned char pad4[0xBE];
  128. volatile unsigned short intstatus; /* offset 0xFE */
  129. };
  130. #endif /* _MIPS_ITEINT_H */