Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:22:42

0001 /**
0002  * @file
0003  *
0004  * @ingroup raspberrypi_interrupt
0005  *
0006  * @brief Interrupt definitions.
0007  */
0008 
0009 /**
0010  * Copyright (c) 2013 Alan Cudmore
0011  * Copyright (c) 2022 Mohd Noor Aman
0012  * Copyright (c) 2024 Ning Yang
0013  *
0014  *  The license and distribution terms for this file may be
0015  *  found in the file LICENSE in this distribution or at
0016  *
0017  *  http://www.rtems.org/license/LICENSE
0018  *
0019  */
0020 
0021 #ifndef LIBBSP_ARM_RASPBERRYPI_IRQ_H
0022 #define LIBBSP_ARM_RASPBERRYPI_IRQ_H
0023 
0024 #ifndef ASM
0025 
0026 #include <rtems.h>
0027 #include <dev/irq/arm-gic-irq.h>
0028 
0029 /**
0030  * @defgroup raspberrypi_interrupt Interrrupt Support
0031  *
0032  * @ingroup RTEMSBSPsARMRaspberryPi
0033  *
0034  * @brief Interrupt support.
0035  */
0036 
0037 #define BCM2835_INTC_TOTAL_IRQ       216
0038 
0039 #define BCM2835_IRQ_SET1_MIN         0
0040 #define BCM2835_IRQ_SET2_MIN         32
0041 
0042 #define BCM2711_IRQ_VC_PERIPHERAL_BASE 96
0043 
0044 /* Interrupt Vectors: System Timer */
0045 #define BCM2835_IRQ_ID_GPU_TIMER_M0    (BCM2711_IRQ_VC_PERIPHERAL_BASE + 0)
0046 #define BCM2835_IRQ_ID_GPU_TIMER_M1    (BCM2711_IRQ_VC_PERIPHERAL_BASE + 1)
0047 #define BCM2835_IRQ_ID_GPU_TIMER_M2    (BCM2711_IRQ_VC_PERIPHERAL_BASE + 2)
0048 #define BCM2835_IRQ_ID_GPU_TIMER_M3    (BCM2711_IRQ_VC_PERIPHERAL_BASE + 3)
0049 
0050 /* Interrupt Vectors: SPI */
0051 #define BCM2711_IRQ_SPI         (BCM2711_IRQ_VC_PERIPHERAL_BASE + 54)
0052 
0053 /* Interrupt Vectors: Videocore */
0054 #define BCM2711_IRQ_VC_PERIPHERAL_BASE 96
0055 #define BCM2711_IRQ_AUX                (BCM2711_IRQ_VC_PERIPHERAL_BASE + 29)
0056 #define BCM2711_IRQ_PL011_UART         (BCM2711_IRQ_VC_PERIPHERAL_BASE + 57)
0057 
0058 #define BCM2835_IRQ_ID_USB           9
0059 #define BCM2835_IRQ_ID_AUX           29
0060 #define BCM2835_IRQ_ID_SPI_SLAVE     43
0061 #define BCM2835_IRQ_ID_PWA0          45
0062 #define BCM2835_IRQ_ID_PWA1          46
0063 #define BCM2835_IRQ_ID_SMI           48
0064 #define BCM2835_IRQ_ID_GPIO_0        49
0065 #define BCM2835_IRQ_ID_GPIO_1        50
0066 #define BCM2835_IRQ_ID_GPIO_2        51
0067 #define BCM2835_IRQ_ID_GPIO_3        52
0068 #define BCM2835_IRQ_ID_I2C           53
0069 #define BCM2835_IRQ_ID_SPI           54
0070 #define BCM2835_IRQ_ID_PCM           55
0071 #define BCM2835_IRQ_ID_UART          57
0072 #define BCM2835_IRQ_ID_SD            62
0073 
0074 #define BCM2835_IRQ_ID_BASIC_BASE_ID 64
0075 #define BCM2835_IRQ_ID_TIMER_0       64
0076 #define BCM2835_IRQ_ID_MAILBOX_0     65
0077 #define BCM2835_IRQ_ID_DOORBELL_0    66
0078 #define BCM2835_IRQ_ID_DOORBELL_1    67
0079 #define BCM2835_IRQ_ID_GPU0_HALTED   68
0080 #define BCM2835_IRQ_ID_GPU1_HALTED   69
0081 #define BCM2835_IRQ_ID_ILL_ACCESS_1  70
0082 #define BCM2835_IRQ_ID_ILL_ACCESS_0  71
0083 #define BSP_TIMER_VIRT_PPI 27
0084 #define BSP_TIMER_PHYS_NS_PPI 30
0085 #define BSP_VPL011_SPI 32
0086 
0087 #define BSP_INTERRUPT_VECTOR_COUNT    BCM2835_INTC_TOTAL_IRQ
0088 #define BSP_INTERRUPT_VECTOR_INVALID (UINT32_MAX)
0089 
0090 #define BSP_IRQ_COUNT               (BCM2835_INTC_TOTAL_IRQ)
0091 
0092 #endif /* ASM */
0093 #endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */