blob: ad30984fa65604a40590de4d4e119935eb2f5b74 [file] [log] [blame]
Boyan Karatotev5d893412025-01-07 11:00:03 +00001#
2# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7GIC_REVISIONS_ := 1 2 3
8ifeq ($(filter $(USE_GIC_DRIVER),$(GIC_REVISIONS_)),)
9$(error USE_GIC_DRIVER can only be one of $(GIC_REVISIONS_))
10endif
11
12ifeq (${USE_GIC_DRIVER},2)
13include drivers/arm/gic/v2/gicv2.mk
14GIC_SOURCES := ${GICV2_SOURCES} \
15 drivers/arm/gic/v2/gicv2_base.c \
16 plat/common/plat_gicv2.c
17else ifeq (${USE_GIC_DRIVER},3)
18include drivers/arm/gic/v3/gicv3.mk
19GIC_SOURCES := ${GICV3_SOURCES} \
20 drivers/arm/gic/v3/gicv3_base.c \
21 plat/common/plat_gicv3.c
22endif
23
24ifeq ($(ARCH),aarch64)
25BL31_SOURCES += ${GIC_SOURCES}
26else
27BL32_SOURCES += ${GIC_SOURCES}
28endif
29
30$(eval $(call add_defines,\
31 USE_GIC_DRIVER \
32))