xref: /OK3568_Linux_fs/kernel/include/dt-bindings/interrupt-controller/arm-gic.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * This header provides constants for the ARM GIC.
4*4882a593Smuzhiyun  */
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun #ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_ARM_GIC_H
7*4882a593Smuzhiyun #define _DT_BINDINGS_INTERRUPT_CONTROLLER_ARM_GIC_H
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #include <dt-bindings/interrupt-controller/irq.h>
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun /* interrupt specifier cell 0 */
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #define GIC_SPI 0
14*4882a593Smuzhiyun #define GIC_PPI 1
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun /*
17*4882a593Smuzhiyun  * Interrupt specifier cell 2.
18*4882a593Smuzhiyun  * The flags in irq.h are valid, plus those below.
19*4882a593Smuzhiyun  */
20*4882a593Smuzhiyun #define GIC_CPU_MASK_RAW(x) ((x) << 8)
21*4882a593Smuzhiyun #define GIC_CPU_MASK_SIMPLE(num) GIC_CPU_MASK_RAW((1 << (num)) - 1)
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun #endif
24