source: rtems/bsps/arm/raspberrypi/include/bsp/irq.h @ cd5573c

Last change on this file since cd5573c was cd5573c, checked in by Sebastian Huber <sebastian.huber@…>, on 06/19/21 at 10:40:57

bsps/irq: Add BSP_INTERRUPT_VECTOR_COUNT

Assert BSP_INTERRUPT_VECTOR_MAX + 1 == BSP_INTERRUPT_VECTOR_COUNT.

After building all BSPs with this patch, BSP_INTERRUPT_VECTOR_MAX can be
removed and replaced by BSP_INTERRUPT_VECTOR_COUNT. The
BSP_INTERRUPT_VECTOR_COUNT allows a default implementation which supports no
interrupt vector at all. Using COUNT instead of MAX may avoid some
interpretation issues, for example is the maximum value a valid vector number
or not.

Update #3269.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup raspberrypi_interrupt
5 *
6 * @brief Interrupt definitions.
7 */
8
9/**
10 * Copyright (c) 2013 Alan Cudmore
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *
15 *  http://www.rtems.org/license/LICENSE
16 *
17 */
18
19#ifndef LIBBSP_ARM_RASBPERRYPI_IRQ_H
20#define LIBBSP_ARM_RASPBERRYPI_IRQ_H
21
22#ifndef ASM
23
24#include <rtems.h>
25#include <rtems/irq.h>
26#include <rtems/irq-extension.h>
27
28/**
29 * @defgroup raspberrypi_interrupt Interrrupt Support
30 *
31 * @ingroup RTEMSBSPsARMRaspberryPi
32 *
33 * @brief Interrupt support.
34 */
35
36#define BCM2835_INTC_TOTAL_IRQ       64 + 8
37#define BCM2835_INTC_TOTAL_IRQ       (64 + 8)
38
39#define BCM2835_IRQ_SET1_MIN         0
40#define BCM2835_IRQ_SET2_MIN         32
41
42#define BCM2835_IRQ_ID_GPU_TIMER_M0  0
43#define BCM2835_IRQ_ID_GPU_TIMER_M1  1
44#define BCM2835_IRQ_ID_GPU_TIMER_M2  2
45#define BCM2835_IRQ_ID_GPU_TIMER_M3  3
46
47#define BCM2835_IRQ_ID_USB           9
48#define BCM2835_IRQ_ID_AUX           29
49#define BCM2835_IRQ_ID_SPI_SLAVE     43
50#define BCM2835_IRQ_ID_PWA0          45
51#define BCM2835_IRQ_ID_PWA1          46
52#define BCM2835_IRQ_ID_SMI           48
53#define BCM2835_IRQ_ID_GPIO_0        49
54#define BCM2835_IRQ_ID_GPIO_1        50
55#define BCM2835_IRQ_ID_GPIO_2        51
56#define BCM2835_IRQ_ID_GPIO_3        52
57#define BCM2835_IRQ_ID_I2C           53
58#define BCM2835_IRQ_ID_SPI           54
59#define BCM2835_IRQ_ID_PCM           55
60#define BCM2835_IRQ_ID_UART          57
61#define BCM2835_IRQ_ID_SD            62
62
63#define BCM2835_IRQ_ID_BASIC_BASE_ID 64
64#define BCM2835_IRQ_ID_TIMER_0       64
65#define BCM2835_IRQ_ID_MAILBOX_0     65
66#define BCM2835_IRQ_ID_DOORBELL_0    66
67#define BCM2835_IRQ_ID_DOORBELL_1    67
68#define BCM2835_IRQ_ID_GPU0_HALTED   68
69#define BCM2835_IRQ_ID_GPU1_HALTED   69
70#define BCM2835_IRQ_ID_ILL_ACCESS_1  70
71#define BCM2835_IRQ_ID_ILL_ACCESS_0  71
72
73#define BSP_INTERRUPT_VECTOR_MAX    (BCM2835_INTC_TOTAL_IRQ - 1)
74#define BSP_INTERRUPT_VECTOR_COUNT    BCM2835_INTC_TOTAL_IRQ
75#define BSP_INTERRUPT_VECTOR_INVALID (UINT32_MAX)
76
77#define BSP_IRQ_COUNT               (BCM2835_INTC_TOTAL_IRQ)
78
79#endif /* ASM */
80#endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */
Note: See TracBrowser for help on using the repository browser.