at91_aic.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. #ifndef _ARCH_ARM_AT91_AIC_H_
  2. #define _ARCH_ARM_AT91_AIC_H_
  3. /*
  4. * Copyright (C) 2005-2006 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
  23. * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. */
  34. /*!
  35. * \file arch/arm/at91_aic.h
  36. * \brief AT91 peripherals.
  37. *
  38. * \verbatim
  39. *
  40. * $Log: at91_aic.h,v $
  41. * Revision 1.2 2006/08/31 19:08:14 haraldkipp
  42. * Defining register offsets simplifies assembly programming.
  43. *
  44. * Revision 1.1 2006/07/05 07:45:25 haraldkipp
  45. * Split on-chip interface definitions.
  46. *
  47. *
  48. * \endverbatim
  49. */
  50. /*!
  51. * \addtogroup xgNutArchArmAt91Aic
  52. */
  53. /*@{*/
  54. /*! \name Interrupt Source Mode Registers */
  55. /*@{*/
  56. /*! \brief Source mode register array.
  57. */
  58. #define AIC_SMR(i) (AIC_BASE + i * 4)
  59. /*! \brief Priority mask.
  60. *
  61. * Priority levels can be between 0 (lowest) and 7 (highest).
  62. */
  63. #define AIC_PRIOR 0x00000007
  64. /*! \brief Interrupt source type mask.
  65. *
  66. * Internal interrupts can level sensitive or edge triggered.
  67. *
  68. * External interrupts can triggered on positive or negative levels or
  69. * on rising or falling edges.
  70. */
  71. #define AIC_SRCTYPE 0x00000060
  72. #define AIC_SRCTYPE_INT_LEVEL_SENSITIVE 0x00000000 /*!< \brief Internal level sensitive. */
  73. #define AIC_SRCTYPE_INT_EDGE_TRIGGERED 0x00000020 /*!< \brief Internal edge triggered. */
  74. #define AIC_SRCTYPE_EXT_LOW_LEVEL 0x00000000 /*!< \brief External low level. */
  75. #define AIC_SRCTYPE_EXT_NEGATIVE_EDGE 0x00000020 /*!< \brief External falling edge. */
  76. #define AIC_SRCTYPE_EXT_HIGH_LEVEL 0x00000040 /*!< \brief External high level. */
  77. #define AIC_SRCTYPE_EXT_POSITIVE_EDGE 0x00000060 /*!< \brief External rising edge. */
  78. /*@}*/
  79. /*! \name Interrupt Source Vector Registers */
  80. /*@{*/
  81. /*! \brief Source vector register array.
  82. *
  83. * Stores the addresses of the corresponding interrupt handlers.
  84. */
  85. #define AIC_SVR(i) (AIC_BASE + 0x80 + i * 4)
  86. /*@}*/
  87. /*! \name Interrupt Vector Register */
  88. /*@{*/
  89. #define AIC_IVR_OFF 0x00000100 /*!< \brief IRQ vector register offset. */
  90. #define AIC_IVR (AIC_BASE + AIC_IVR_OFF) /*!< \brief IRQ vector register address. */
  91. /*@}*/
  92. /*! \name Fast Interrupt Vector Register */
  93. /*@{*/
  94. #define AIC_FVR_OFF 0x00000104 /*!< \brief FIQ vector register offset. */
  95. #define AIC_FVR (AIC_BASE + AIC_FVR_OFF) /*!< \brief FIQ vector register address. */
  96. /*@}*/
  97. /*! \name Interrupt Status Register */
  98. /*@{*/
  99. #define AIC_ISR_OFF 0x00000108 /*!< \brief Interrupt status register offset. */
  100. #define AIC_ISR (AIC_BASE + AIC_ISR_OFF) /*!< \brief Interrupt status register address. */
  101. #define AIC_IRQID 0x0000001F /*!< \brief Current interrupt identifier mask. */
  102. /*@}*/
  103. /*! \name Interrupt Pending Register */
  104. /*@{*/
  105. #define AIC_IPR_OFF 0x0000010C /*!< \brief Interrupt pending register offset. */
  106. #define AIC_IPR (AIC_BASE + AIC_IPR_OFF) /*!< \brief Interrupt pending register address. */
  107. /*@}*/
  108. /*! \name Interrupt Mask Register */
  109. /*@{*/
  110. #define AIC_IMR_OFF 0x00000110 /*!< \brief Interrupt mask register offset. */
  111. #define AIC_IMR (AIC_BASE + AIC_IMR_OFF) /*!< \brief Interrupt mask register address. */
  112. /*@}*/
  113. /*! \name Interrupt Core Status Register */
  114. /*@{*/
  115. #define AIC_CISR_OFF 0x00000114 /*!< \brief Core interrupt status register offset. */
  116. #define AIC_CISR (AIC_BASE + AIC_CISR_OFF) /*!< \brief Core interrupt status register address. */
  117. #define AIC_NFIQ 0x00000001 /*!< \brief Core FIQ Status */
  118. #define AIC_NIRQ 0x00000002 /*!< \brief Core IRQ Status */
  119. /*@}*/
  120. /*! \name Interrupt Enable Command Register */
  121. /*@{*/
  122. #define AIC_IECR_OFF 0x00000120 /*!< \brief Interrupt enable command register offset. */
  123. #define AIC_IECR (AIC_BASE + AIC_IECR_OFF) /*!< \brief Interrupt enable command register address. */
  124. /*@}*/
  125. /*! \name Interrupt Disable Command Register */
  126. /*@{*/
  127. #define AIC_IDCR_OFF 0x00000124 /*!< \brief Interrupt disable command register offset. */
  128. #define AIC_IDCR (AIC_BASE + AIC_IDCR_OFF) /*!< \brief Interrupt disable command register address. */
  129. /*@}*/
  130. /*! \name Interrupt Clear Command Register */
  131. /*@{*/
  132. #define AIC_ICCR_OFF 0x00000128 /*!< \brief Interrupt clear command register offset. */
  133. #define AIC_ICCR (AIC_BASE + AIC_ICCR_OFF) /*!< \brief Interrupt clear command register address. */
  134. /*@}*/
  135. /*! \name Interrupt Set Command Register */
  136. /*@{*/
  137. #define AIC_ISCR_OFF 0x0000012C /*!< \brief Interrupt set command register offset. */
  138. #define AIC_ISCR (AIC_BASE + AIC_ISCR_OFF) /*!< \brief Interrupt set command register address. */
  139. /*@}*/
  140. /*! \name End Of Interrupt Command Register */
  141. /*@{*/
  142. #define AIC_EOICR_OFF 0x00000130 /*!< \brief End of interrupt command register offset. */
  143. #define AIC_EOICR (AIC_BASE + AIC_EOICR_OFF) /*!< \brief End of interrupt command register address. */
  144. /*@}*/
  145. /*! \name Spurious Interrupt Vector Register */
  146. /*@{*/
  147. #define AIC_SPU_OFF 0x00000134 /*!< \brief Spurious vector register offset. */
  148. #define AIC_SPU (AIC_BASE + AIC_SPU_OFF) /*!< \brief Spurious vector register address. */
  149. /*@}*/
  150. /*! \name Debug Control Register */
  151. /*@{*/
  152. #define AIC_DCR_OFF 0x0000138 /*!< \brief Debug control register offset. */
  153. #define AIC_DCR (AIC_BASE + AIC_DCR_OFF) /*!< \brief Debug control register address. */
  154. /*@}*/
  155. /*! \name Fast Forcing Enable Register */
  156. /*@{*/
  157. #define AIC_FFER_OFF 0x00000140 /*!< \brief Fast forcing enable register offset. */
  158. #define AIC_FFER (AIC_BASE + AIC_FFER_OFF) /*!< \brief Fast forcing enable register address. */
  159. /*@}*/
  160. /*! \name Fast Forcing Disable Register */
  161. /*@{*/
  162. #define AIC_FFDR_OFF 0x00000144 /*!< \brief Fast forcing disable register address. */
  163. #define AIC_FFDR (AIC_BASE + AIC_FFDR_OFF) /*!< \brief Fast forcing disable register address. */
  164. /*@}*/
  165. /*! \name Fast Forcing Status Register */
  166. /*@{*/
  167. #define AIC_FFSR_OFF 0x00000148 /*!< \brief Fast forcing status register address. */
  168. #define AIC_FFSR (AIC_BASE + AIC_FFSR_OFF) /*!< \brief Fast forcing status register address. */
  169. /*@}*/
  170. /*@} xgNutArchArmAt91Aic */
  171. #endif /* _ARCH_ARM_AT91_AIC_H_ */