maltaint.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. * Carsten Langgaard, carstenl@mips.com
  3. * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
  4. *
  5. * ########################################################################
  6. *
  7. * This program is free software; you can distribute it and/or modify it
  8. * under the terms of the GNU General Public License (Version 2) as
  9. * published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope it will be useful, but WITHOUT
  12. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14. * for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  19. *
  20. * ########################################################################
  21. *
  22. * Defines for the Malta interrupt controller.
  23. *
  24. */
  25. #ifndef _MIPS_MALTAINT_H
  26. #define _MIPS_MALTAINT_H
  27. #include <irq.h>
  28. /*
  29. * Interrupts 0..15 are used for Malta ISA compatible interrupts
  30. */
  31. #define MALTA_INT_BASE 0
  32. /* CPU interrupt offsets */
  33. #define MIPSCPU_INT_SW0 0
  34. #define MIPSCPU_INT_SW1 1
  35. #define MIPSCPU_INT_MB0 2
  36. #define MIPSCPU_INT_I8259A MIPSCPU_INT_MB0
  37. #define MIPSCPU_INT_MB1 3
  38. #define MIPSCPU_INT_SMI MIPSCPU_INT_MB1
  39. #define MIPSCPU_INT_IPI0 MIPSCPU_INT_MB1 /* GIC IPI */
  40. #define MIPSCPU_INT_MB2 4
  41. #define MIPSCPU_INT_IPI1 MIPSCPU_INT_MB2 /* GIC IPI */
  42. #define MIPSCPU_INT_MB3 5
  43. #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3
  44. #define MIPSCPU_INT_MB4 6
  45. #define MIPSCPU_INT_CORELO MIPSCPU_INT_MB4
  46. /*
  47. * Interrupts 64..127 are used for Soc-it Classic interrupts
  48. */
  49. #define MSC01C_INT_BASE 64
  50. /* SOC-it Classic interrupt offsets */
  51. #define MSC01C_INT_TMR 0
  52. #define MSC01C_INT_PCI 1
  53. /*
  54. * Interrupts 64..127 are used for Soc-it EIC interrupts
  55. */
  56. #define MSC01E_INT_BASE 64
  57. /* SOC-it EIC interrupt offsets */
  58. #define MSC01E_INT_SW0 1
  59. #define MSC01E_INT_SW1 2
  60. #define MSC01E_INT_MB0 3
  61. #define MSC01E_INT_I8259A MSC01E_INT_MB0
  62. #define MSC01E_INT_MB1 4
  63. #define MSC01E_INT_SMI MSC01E_INT_MB1
  64. #define MSC01E_INT_MB2 5
  65. #define MSC01E_INT_MB3 6
  66. #define MSC01E_INT_COREHI MSC01E_INT_MB3
  67. #define MSC01E_INT_MB4 7
  68. #define MSC01E_INT_CORELO MSC01E_INT_MB4
  69. #define MSC01E_INT_TMR 8
  70. #define MSC01E_INT_PCI 9
  71. #define MSC01E_INT_PERFCTR 10
  72. #define MSC01E_INT_CPUCTR 11
  73. /* GIC's Nomenclature for Core Interrupt Pins on the Malta */
  74. #define GIC_CPU_INT0 0 /* Core Interrupt 2 */
  75. #define GIC_CPU_INT1 1 /* . */
  76. #define GIC_CPU_INT2 2 /* . */
  77. #define GIC_CPU_INT3 3 /* . */
  78. #define GIC_CPU_INT4 4 /* . */
  79. #define GIC_CPU_INT5 5 /* Core Interrupt 5 */
  80. #define GIC_EXT_INTR(x) x
  81. /* Dummy data */
  82. #define X 0xdead
  83. /* External Interrupts used for IPI */
  84. #define GIC_IPI_EXT_INTR_RESCHED_VPE0 16
  85. #define GIC_IPI_EXT_INTR_CALLFNC_VPE0 17
  86. #define GIC_IPI_EXT_INTR_RESCHED_VPE1 18
  87. #define GIC_IPI_EXT_INTR_CALLFNC_VPE1 19
  88. #define GIC_IPI_EXT_INTR_RESCHED_VPE2 20
  89. #define GIC_IPI_EXT_INTR_CALLFNC_VPE2 21
  90. #define GIC_IPI_EXT_INTR_RESCHED_VPE3 22
  91. #define GIC_IPI_EXT_INTR_CALLFNC_VPE3 23
  92. #define MIPS_GIC_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8)
  93. #ifndef __ASSEMBLY__
  94. extern void maltaint_init(void);
  95. #endif
  96. #endif /* !(_MIPS_MALTAINT_H) */