blob: d75e07119419482ab0feabf3481190f005eb7382 [file] [log] [blame]
Pankaj Guptab9508bf2020-12-09 14:02:39 +05301# Copyright 2021 NXP
2#
3# SPDX-License-Identifier: BSD-3-Clause
4#
5#
6#------------------------------------------------------------------------------
7#
8# Select the GIC files
9#
10# -----------------------------------------------------------------------------
11
12ifeq (${ADD_GIC},)
13ADD_GIC := 1
14ifeq ($(GIC), GIC400)
15include drivers/arm/gic/v2/gicv2.mk
16GIC_SOURCES += ${GICV2_SOURCES}
17GIC_SOURCES += ${PLAT_DRIVERS_PATH}/gic/ls_gicv2.c \
18 plat/common/plat_gicv2.c
19
Pankaj Gupta7834b462021-03-25 15:15:52 +053020PLAT_INCLUDES += -I${PLAT_DRIVERS_INCLUDE_PATH}/gic/gicv2
Pankaj Guptab9508bf2020-12-09 14:02:39 +053021else
22ifeq ($(GIC), GIC500)
23include drivers/arm/gic/v3/gicv3.mk
24GIC_SOURCES += ${GICV3_SOURCES}
25GIC_SOURCES += ${PLAT_DRIVERS_PATH}/gic/ls_gicv3.c \
26 plat/common/plat_gicv3.c
27
Pankaj Gupta7834b462021-03-25 15:15:52 +053028PLAT_INCLUDES += -I${PLAT_DRIVERS_INCLUDE_PATH}/gic/gicv3
Pankaj Guptab9508bf2020-12-09 14:02:39 +053029else
30 $(error -> GIC type not set!)
31endif
32endif
33
34ifeq (${BL_COMM_GIC_NEEDED},yes)
35BL_COMMON_SOURCES += ${GIC_SOURCES}
36else
37ifeq (${BL2_GIC_NEEDED},yes)
38BL2_SOURCES += ${GIC_SOURCES}
39endif
40ifeq (${BL31_GIC_NEEDED},yes)
41BL31_SOURCES += ${GIC_SOURCES}
42endif
43endif
44endif
45
46# -----------------------------------------------------------------------------