forked from Mirrors/opensbi
lib: utils/irqchip: Use kconfig for enabling/disabling drivers
We update irqchip drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate irqchip drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:
40
lib/utils/irqchip/Kconfig
Normal file
40
lib/utils/irqchip/Kconfig
Normal file
@@ -0,0 +1,40 @@
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
menu "Interrupt Controller Support"
|
||||
|
||||
config FDT_IRQCHIP
|
||||
bool "FDT based interrupt controller drivers"
|
||||
default n
|
||||
|
||||
if FDT_IRQCHIP
|
||||
|
||||
config FDT_IRQCHIP_APLIC
|
||||
bool "Advanced Platform Level Interrupt Controller (APLIC) FDT driver"
|
||||
select IRQCHIP_APLIC
|
||||
default n
|
||||
|
||||
config FDT_IRQCHIP_IMSIC
|
||||
bool "Incoming Message Signalled Interrupt Controller (IMSIC) FDT driver"
|
||||
select IRQCHIP_IMSIC
|
||||
default n
|
||||
|
||||
config FDT_IRQCHIP_PLIC
|
||||
bool "Platform Level Interrupt Controller (PLIC) FDT driver"
|
||||
select IRQCHIP_PLIC
|
||||
default n
|
||||
|
||||
endif
|
||||
|
||||
config IRQCHIP_APLIC
|
||||
bool "Advanced Platform Level Interrupt Controller (APLIC) support"
|
||||
default n
|
||||
|
||||
config IRQCHIP_IMSIC
|
||||
bool "Incoming Message Signalled Interrupt Controller (IMSIC) support"
|
||||
default n
|
||||
|
||||
config IRQCHIP_PLIC
|
||||
bool "Platform Level Interrupt Controller (PLIC) support"
|
||||
default n
|
||||
|
||||
endmenu
|
@@ -7,18 +7,18 @@
|
||||
# Anup Patel <anup.patel@wdc.com>
|
||||
#
|
||||
|
||||
libsbiutils-objs-y += irqchip/fdt_irqchip.o
|
||||
libsbiutils-objs-y += irqchip/fdt_irqchip_drivers.o
|
||||
libsbiutils-objs-$(CONFIG_FDT_IRQCHIP) += irqchip/fdt_irqchip.o
|
||||
libsbiutils-objs-$(CONFIG_FDT_IRQCHIP) += irqchip/fdt_irqchip_drivers.o
|
||||
|
||||
carray-fdt_irqchip_drivers-y += fdt_irqchip_aplic
|
||||
libsbiutils-objs-y += irqchip/fdt_irqchip_aplic.o
|
||||
carray-fdt_irqchip_drivers-$(CONFIG_FDT_IRQCHIP_APLIC) += fdt_irqchip_aplic
|
||||
libsbiutils-objs-$(CONFIG_FDT_IRQCHIP_APLIC) += irqchip/fdt_irqchip_aplic.o
|
||||
|
||||
carray-fdt_irqchip_drivers-y += fdt_irqchip_imsic
|
||||
libsbiutils-objs-y += irqchip/fdt_irqchip_imsic.o
|
||||
carray-fdt_irqchip_drivers-$(CONFIG_FDT_IRQCHIP_IMSIC) += fdt_irqchip_imsic
|
||||
libsbiutils-objs-$(CONFIG_FDT_IRQCHIP_IMSIC) += irqchip/fdt_irqchip_imsic.o
|
||||
|
||||
carray-fdt_irqchip_drivers-y += fdt_irqchip_plic
|
||||
libsbiutils-objs-y += irqchip/fdt_irqchip_plic.o
|
||||
carray-fdt_irqchip_drivers-$(CONFIG_FDT_IRQCHIP_PLIC) += fdt_irqchip_plic
|
||||
libsbiutils-objs-$(CONFIG_FDT_IRQCHIP_PLIC) += irqchip/fdt_irqchip_plic.o
|
||||
|
||||
libsbiutils-objs-y += irqchip/aplic.o
|
||||
libsbiutils-objs-y += irqchip/imsic.o
|
||||
libsbiutils-objs-y += irqchip/plic.o
|
||||
libsbiutils-objs-$(CONFIG_IRQCHIP_APLIC) += irqchip/aplic.o
|
||||
libsbiutils-objs-$(CONFIG_IRQCHIP_IMSIC) += irqchip/imsic.o
|
||||
libsbiutils-objs-$(CONFIG_IRQCHIP_PLIC) += irqchip/plic.o
|
||||
|
Reference in New Issue
Block a user