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