drivers: interrupt_controller: Refactor GIC configurations
The current GIC configuration scheme is designed to support only one specific type and version of GIC (i.e. GIC-400 that implements the GICv2 interface). This commit adds a set of GIC version configuration symbols that can be selected by the SoC configuration to specify which version of GIC interface is implemented in the SoC. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
parent
08a017a34b
commit
11d0f0a294
3 changed files with 42 additions and 8 deletions
|
@ -39,13 +39,6 @@ config VEXRISCV_LITEX_IRQ
|
|||
help
|
||||
IRQ implementation for LiteX VexRiscv
|
||||
|
||||
config GIC
|
||||
bool "ARM Generic Interrupt Controller (GIC)"
|
||||
depends on CPU_CORTEX_R
|
||||
help
|
||||
The ARM Generic Interrupt Controller works with Cortex-A and
|
||||
Cortex-R processors.
|
||||
|
||||
source "drivers/interrupt_controller/Kconfig.multilevel"
|
||||
|
||||
source "drivers/interrupt_controller/Kconfig.loapic"
|
||||
|
@ -60,4 +53,6 @@ source "drivers/interrupt_controller/Kconfig.rv32m1"
|
|||
|
||||
source "drivers/interrupt_controller/Kconfig.sam0"
|
||||
|
||||
source "drivers/interrupt_controller/Kconfig.gic"
|
||||
|
||||
endmenu
|
||||
|
|
39
drivers/interrupt_controller/Kconfig.gic
Normal file
39
drivers/interrupt_controller/Kconfig.gic
Normal file
|
@ -0,0 +1,39 @@
|
|||
# ARM Generic Interrupt Controller (GIC) configuration
|
||||
|
||||
# Copyright (c) 2019 Stephanos Ioannidis <root@stephanos.io>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if CPU_CORTEX
|
||||
|
||||
config GIC
|
||||
bool
|
||||
|
||||
config GIC_V1
|
||||
bool
|
||||
select GIC
|
||||
help
|
||||
The ARM Generic Interrupt Controller v1 (e.g. PL390) works with the
|
||||
ARM Cortex-family processors.
|
||||
|
||||
config GIC_V2
|
||||
bool
|
||||
select GIC
|
||||
help
|
||||
The ARM Generic Interrupt Controller v2 (e.g. GIC-400) works with the
|
||||
ARM Cortex-family processors.
|
||||
|
||||
config GIC_V3
|
||||
bool
|
||||
select GIC
|
||||
help
|
||||
The ARM Generic Interrupt Controller v3 (e.g. GIC-500 and GIC-600)
|
||||
works with the ARM Cortex-family processors.
|
||||
|
||||
config GIC_VER
|
||||
int
|
||||
depends on GIC
|
||||
default 1 if GIC_V1
|
||||
default 2 if GIC_V2
|
||||
default 3 if GIC_V3
|
||||
|
||||
endif # CPU_CORTEX
|
|
@ -4,6 +4,6 @@
|
|||
config SOC_XILINX_ZYNQMP
|
||||
bool "Xilinx ZynqMP"
|
||||
select CPU_CORTEX_R5
|
||||
select GIC
|
||||
select GIC_V1
|
||||
select MULTI_LEVEL_INTERRUPTS
|
||||
select 2ND_LEVEL_INTERRUPTS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue