Skip to content

Commit 2f5ac45

Browse files
p-wojnashif
authored andcommitted
dts: bindings: interrupt-controller: GIC: Allow specifying version in DT
Currently, only the presence of a GIC is reflected in the device tree, and its version must be set separately in each SoC's Kconfig. This patch adds separate bindings for each GIC version whose presence in the device tree automatically enables the corresponding Kconfig symbol. Signed-off-by: Piotr Wojnarowski <[email protected]>
1 parent 88f4353 commit 2f5ac45

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

drivers/interrupt_controller/Kconfig.gic

+15-3
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,38 @@ if CPU_CORTEX
88
config GIC
99
bool
1010

11+
# Selecting these symbols directly is deprecated: the GIC architecture version
12+
# should be specified by adding the appropriate compat (for example arm,gic-v2)
13+
# to the DT.
1114
config GIC_V1
12-
bool
15+
def_bool DT_HAS_ARM_GIC_V1_ENABLED
1316
select GIC
17+
select DEPRECATED if !DT_HAS_ARM_GIC_V1_ENABLED
1418
help
1519
The ARM Generic Interrupt Controller v1 (e.g. PL390) works with the
1620
ARM Cortex-family processors.
21+
Selecting this symbol directly is deprecated. Please add the arm,gic-v1
22+
compatible to the GIC node in your DT and remove the direct selection.
1723

1824
config GIC_V2
19-
bool
25+
def_bool DT_HAS_ARM_GIC_V2_ENABLED
2026
select GIC
27+
select DEPRECATED if !DT_HAS_ARM_GIC_V2_ENABLED
2128
help
2229
The ARM Generic Interrupt Controller v2 (e.g. GIC-400) works with the
2330
ARM Cortex-family processors.
31+
Selecting this symbol directly is deprecated. Please add the arm,gic-v2
32+
compatible to the GIC node in your DT and remove the direct selection.
2433

2534
config GIC_V3
26-
bool
35+
def_bool DT_HAS_ARM_GIC_V3_ENABLED
2736
select GIC
37+
select DEPRECATED if !DT_HAS_ARM_GIC_V3_ENABLED
2838
help
2939
The ARM Generic Interrupt Controller v3 (e.g. GIC-500 and GIC-600)
3040
works with the ARM Cortex-family processors.
41+
Selecting this symbol directly is deprecated. Please add the arm,gic-v3
42+
compatible to the GIC node in your DT and remove the direct selection.
3143

3244
config GIC_VER
3345
int
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
description: ARM Generic Interrupt Controller v1
4+
5+
compatible: arm,gic-v1
6+
7+
include: arm,gic.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
description: ARM Generic Interrupt Controller v2
4+
5+
compatible: arm,gic-v2
6+
7+
include: arm,gic.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
description: ARM Generic Interrupt Controller v3
4+
5+
compatible: arm,gic-v3
6+
7+
include: arm,gic.yaml

0 commit comments

Comments
 (0)