Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 1 | /* |
Yann Gautier | 6fa0461 | 2021-05-25 18:14:24 +0200 | [diff] [blame] | 2 | * Copyright (c) 2019-2021, Arm Limited and Contributors. All rights reserved. |
Alexei Fedorov | 9fe73b2 | 2021-04-23 16:12:11 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 6 | * This header provides constants for the ARM GIC. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_ARM_GIC_H |
| 10 | #define _DT_BINDINGS_INTERRUPT_CONTROLLER_ARM_GIC_H |
| 11 | |
Yann Gautier | 6fa0461 | 2021-05-25 18:14:24 +0200 | [diff] [blame] | 12 | #include <dt-bindings/interrupt-controller/irq.h> |
| 13 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 14 | /* interrupt specifier cell 0 */ |
| 15 | |
| 16 | #define GIC_SPI 0 |
| 17 | #define GIC_PPI 1 |
| 18 | |
Alexei Fedorov | cb8fef6 | 2021-04-12 12:49:54 +0100 | [diff] [blame] | 19 | /* |
| 20 | * Interrupt specifier cell 2. |
Yann Gautier | 6fa0461 | 2021-05-25 18:14:24 +0200 | [diff] [blame] | 21 | * The flags in irq.h are valid, plus those below. |
Alexei Fedorov | cb8fef6 | 2021-04-12 12:49:54 +0100 | [diff] [blame] | 22 | */ |
| 23 | #define GIC_CPU_MASK_RAW(x) ((x) << 8) |
Yann Gautier | 6fa0461 | 2021-05-25 18:14:24 +0200 | [diff] [blame] | 24 | #define GIC_CPU_MASK_SIMPLE(num) GIC_CPU_MASK_RAW((1 << (num)) - 1) |
Alexei Fedorov | cb8fef6 | 2021-04-12 12:49:54 +0100 | [diff] [blame] | 25 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 26 | #endif |