rv32m1ri5cy_irq.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /****************************************************************************
  2. * arch/risc-v/include/rv32m1/rv32m1ri5cy_irq.h
  3. *
  4. * Licensed to the Apache Software Foundation (ASF) under one or more
  5. * contributor license agreements. See the NOTICE file distributed with
  6. * this work for additional information regarding copyright ownership. The
  7. * ASF licenses this file to you under the Apache License, Version 2.0 (the
  8. * "License"); you may not use this file except in compliance with the
  9. * License. You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  15. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  16. * License for the specific language governing permissions and limitations
  17. * under the License.
  18. *
  19. ****************************************************************************/
  20. #ifndef __ARCH_RISCV_INCLUDE_RV32M1_RV32M1RI5CY_IRQ_H
  21. #define __ARCH_RISCV_INCLUDE_RV32M1_RV32M1RI5CY_IRQ_H
  22. /****************************************************************************
  23. * Included Files
  24. ****************************************************************************/
  25. #include <arch/rv32im/mcause.h>
  26. /****************************************************************************
  27. * Pre-processor Definitions
  28. ****************************************************************************/
  29. /* RV32M1 RI5CY CPU throws four exceptions:
  30. * -Reset,
  31. * -Illegal Instruction,
  32. * -ECALL Instruct Excecuted,
  33. * -Load Store Unit Error. MCAUSE must be checked to
  34. * figure out what kind of Error.
  35. */
  36. /* RISC-V standard exceptions alias with prefix RV32M1 **********************/
  37. #define RV32M1_IRQ_ADDE_MISALIGNED MCAUSE_ADDE_MISALIGNED
  38. #define RV32M1_IRQ_INST_ACCESS_FAULT MCAUSE_INST_ACCESS_FAULT
  39. #define RV32M1_IRQ_ILLEGAL_INST MCAUSE_ILLEGAL_INST
  40. #define RV32M1_IRQ_LOAD_MISALIGNED MCAUSE_LOAD_MISALIGNED
  41. #define RV32M1_IRQ_LOAD_ACCESS_FAULT MCAUSE_LOAD_ACCESS_FAULT
  42. #define RV32M1_IRQ_STORE_MISALIGNED MCAUSE_STORE_MISALIGNED
  43. #define RV32M1_IRQ_STORE_ACCESS_FAULT MCAUSE_STORE_ACCESS_FAULT
  44. #define RV32M1_IRQ_ECALL_U MCAUSE_ECALL_U
  45. #define RV32M1_IRQ_ECALL_M MCAUSE_ECALL_M
  46. /* RV32M1 RI5CY Interrupts **************************************************/
  47. /* IRQ 16- : (async event:interrupt=1) */
  48. #define RV32M1_IRQ_ASYNC (16)
  49. #define RV32M1_IRQ_MEXT (RV32M1_IRQ_ASYNC + 0) /* Machine External Int */
  50. /* Machine Global External Interrupt */
  51. #define RV32M1_IRQ_DMA0G0 (RV32M1_IRQ_MEXT + 0) /* DMA0 Group0, channel 0/4/8/12 */
  52. #define RV32M1_IRQ_DMA0G1 (RV32M1_IRQ_MEXT + 1) /* DMA0 Group1, channel 1/5/9/13 */
  53. #define RV32M1_IRQ_DMA0G2 (RV32M1_IRQ_MEXT + 2) /* DMA0 Group2, channel 2/6/10/14 */
  54. #define RV32M1_IRQ_DMA0G3 (RV32M1_IRQ_MEXT + 3) /* DMA0 Group3, channel 3/7/11/15 */
  55. #define RV32M1_IRQ_DMA0EER (RV32M1_IRQ_MEXT + 4) /* DAM0 Error */
  56. #define RV32M1_IRQ_CMC0 (RV32M1_IRQ_MEXT + 5) /* Core Mode Controller 0 */
  57. #define RV32M1_IRQ_MUA (RV32M1_IRQ_MEXT + 6) /* MU Side A */
  58. #define RV32M1_IRQ_USB0 (RV32M1_IRQ_MEXT + 7) /* USB0 */
  59. #define RV32M1_IRQ_USDHC0 (RV32M1_IRQ_MEXT + 8) /* SDHC0 */
  60. #define RV32M1_IRQ_I2S0 (RV32M1_IRQ_MEXT + 9) /* I2S0 */
  61. #define RV32M1_IRQ_FLEXIO0 (RV32M1_IRQ_MEXT + 10) /* FlexIO0 */
  62. #define RV32M1_IRQ_EMVSIM0 (RV32M1_IRQ_MEXT + 11) /* EMVSIM0 */
  63. #define RV32M1_IRQ_LPIT0 (RV32M1_IRQ_MEXT + 12) /* LPIT0 */
  64. #define RV32M1_IRQ_LPSPI0 (RV32M1_IRQ_MEXT + 13) /* LPSPI0 */
  65. #define RV32M1_IRQ_LPSPI1 (RV32M1_IRQ_MEXT + 14) /* LPSPI1 */
  66. #define RV32M1_IRQ_LPI2C0 (RV32M1_IRQ_MEXT + 15) /* LPI2C0 */
  67. #define RV32M1_IRQ_LPI2C1 (RV32M1_IRQ_MEXT + 16) /* LPI2C1 */
  68. #define RV32M1_IRQ_LPUART0 (RV32M1_IRQ_MEXT + 17) /* LPUART0 */
  69. #define RV32M1_IRQ_PORTA (RV32M1_IRQ_MEXT + 18) /* PORTA */
  70. #define RV32M1_IRQ_TPM0 (RV32M1_IRQ_MEXT + 19) /* TPM0 */
  71. #define RV32M1_IRQ_ADC0 (RV32M1_IRQ_MEXT + 20) /* ADC0 */
  72. #define RV32M1_IRQ_LPDAC0 (RV32M1_IRQ_MEXT + 21) /* LPDAC0 */
  73. #define RV32M1_IRQ_LPCMP0 (RV32M1_IRQ_MEXT + 22) /* LPCMP0 */
  74. #define RV32M1_IRQ_RTC (RV32M1_IRQ_MEXT + 23) /* RTC */
  75. #define RV32M1_IRQ_INTMUX0 (RV32M1_IRQ_MEXT + 24) /* INTMUX0 */
  76. #define RV32M1_IRQ_INTMUX1 (RV32M1_IRQ_MEXT + 25) /* INTMUX1 */
  77. #define RV32M1_IRQ_INTMUX2 (RV32M1_IRQ_MEXT + 26) /* INTMUX2 */
  78. #define RV32M1_IRQ_INTMUX3 (RV32M1_IRQ_MEXT + 27) /* INTMUX3 */
  79. #define RV32M1_IRQ_INTMUX4 (RV32M1_IRQ_MEXT + 28) /* INTMUX4 */
  80. #define RV32M1_IRQ_INTMUX5 (RV32M1_IRQ_MEXT + 29) /* INTMUX5 */
  81. #define RV32M1_IRQ_INTMUX6 (RV32M1_IRQ_MEXT + 30) /* INTMUX6 */
  82. #define RV32M1_IRQ_INTMUX7 (RV32M1_IRQ_MEXT + 31) /* INTMUX7 */
  83. #define RV32M1_IRQ_EWM (RV32M1_IRQ_MEXT + 32) /* EWM */
  84. # define RV32M1_IRQ_INTMUX RV32M1_IRQ_EWM
  85. #define RV32M1_IRQ_FTFE_CC (RV32M1_IRQ_MEXT + 33) /* FTFE Command Complete */
  86. #define RV32M1_IRQ_FTFE_RC (RV32M1_IRQ_MEXT + 34) /* FTFE Read Collision */
  87. #define RV32M1_IRQ_LLWU0 (RV32M1_IRQ_MEXT + 35) /* Low leakage wake up 0 */
  88. #define RV32M1_IRQ_SPM (RV32M1_IRQ_MEXT + 36) /* SPM */
  89. #define RV32M1_IRQ_WDOG0 (RV32M1_IRQ_MEXT + 37) /* WDOG0 */
  90. #define RV32M1_IRQ_SCG (RV32M1_IRQ_MEXT + 38) /* SCG */
  91. #define RV32M1_IRQ_LPTMR0 (RV32M1_IRQ_MEXT + 39) /* LPTMR0 */
  92. #define RV32M1_IRQ_LPTMR1 (RV32M1_IRQ_MEXT + 40) /* LPTMR1 */
  93. #define RV32M1_IRQ_TPM1 (RV32M1_IRQ_MEXT + 41) /* TPM1 */
  94. #define RV32M1_IRQ_TMP2 (RV32M1_IRQ_MEXT + 42) /* TPM2 */
  95. #define RV32M1_IRQ_LPI2C2 (RV32M1_IRQ_MEXT + 43) /* LPI2C2 */
  96. #define RV32M1_IRQ_SPI2 (RV32M1_IRQ_MEXT + 44) /* SPI2 */
  97. #define RV32M1_IRQ_LPUART1 (RV32M1_IRQ_MEXT + 45) /* LPUART1 */
  98. #define RV32M1_IRQ_LPUART2 (RV32M1_IRQ_MEXT + 46) /* LPUART2 */
  99. #define RV32M1_IRQ_PORTB (RV32M1_IRQ_MEXT + 47) /* PORTB */
  100. #define RV32M1_IRQ_PORTC (RV32M1_IRQ_MEXT + 48) /* PORTC */
  101. #define RV32M1_IRQ_PORTD (RV32M1_IRQ_MEXT + 49) /* PORTD */
  102. #define RV32M1_IRQ_CAU3_TC (RV32M1_IRQ_MEXT + 50) /* CAU3 Task Complete */
  103. #define RV32M1_IRQ_CAU3_SV (RV32M1_IRQ_MEXT + 51) /* CAU3 Security Violation */
  104. #define RV32M1_IRQ_TRNG (RV32M1_IRQ_MEXT + 52) /* TRNG */
  105. #define RV32M1_IRQ_LPIT1 (RV32M1_IRQ_MEXT + 53) /* LPIT1 */
  106. #define RV32M1_IRQ_LPTMR2 (RV32M1_IRQ_MEXT + 54) /* LPTMR2 */
  107. #define RV32M1_IRQ_TPM3 (RV32M1_IRQ_MEXT + 55) /* TPM3 */
  108. #define RV32M1_IRQ_LPI2C3 (RV32M1_IRQ_MEXT + 56) /* LPI2C3 */
  109. #define RV32M1_IRQ_LPSPI3 (RV32M1_IRQ_MEXT + 57) /* LPSPI3 */
  110. #define RV32M1_IRQ_LPUART3 (RV32M1_IRQ_MEXT + 58) /* LPUART3 */
  111. #define RV32M1_IRQ_PORTE (RV32M1_IRQ_MEXT + 59) /* PORTE */
  112. #define RV32M1_IRQ_LPCMP1 (RV32M1_IRQ_MEXT + 60) /* LPCMP1 */
  113. #define RV32M1_IRQ_RF0_0 (RV32M1_IRQ_MEXT + 61) /* RF0 Interrupt 0 */
  114. #define RV32M1_IRQ_RF0_1 (RV32M1_IRQ_MEXT + 62) /* RF0 Interrupt 1 */
  115. /* Total number of IRQs */
  116. #define NR_IRQS (RV32M1_IRQ_RF0_1 + 1)
  117. #endif /* __ARCH_RISCV_INCLUDE_RV32M1_RV32M1RI5CY_IRQ_H */