1# Copyright 2021 NXP
2#
3# SPDX-License-Identifier: BSD-3-Clause
4#
5#
6#------------------------------------------------------------------------------
7#
8# Select the Interconnect files
9#
10# -----------------------------------------------------------------------------
11
12ifeq (${ADD_INTERCONNECT},)
13
14ADD_INTERCONNECT	:= 1
15PLAT_INCLUDES		+= -I${PLAT_DRIVERS_INCLUDE_PATH}/interconnect
16
17ifeq (, $(filter $(INTERCONNECT), CCI400 CCN502 CCN504 CCN508))
18    $(error -> Interconnect type not set!)
19else
20$(eval $(call add_define_val,INTERCONNECT,${INTERCONNECT}))
21ifeq ($(INTERCONNECT), $(filter $(INTERCONNECT), CCN502 CCN504 CCN508))
22INTERCONNECT_SOURCES	:= 	drivers/arm/ccn/ccn.c 		\
23				${PLAT_DRIVERS_PATH}/interconnect/ls_ccn.c
24else
25ifeq ($(INTERCONNECT), CCI400)
26INTERCONNECT_SOURCES	:= 	drivers/arm/cci/cci.c 		\
27				${PLAT_DRIVERS_PATH}/interconnect/ls_cci.c
28endif
29endif
30endif
31
32ifeq (${BL_COMM_INTERCONNECT_NEEDED},yes)
33BL_COMMON_SOURCES	+= ${INTERCONNECT_SOURCES}
34else
35ifeq (${BL2_INTERCONNECT_NEEDED},yes)
36BL2_SOURCES		+= ${INTERCONNECT_SOURCES}
37endif
38ifeq (${BL31_INTERCONNECT_NEEDED},yes)
39BL31_SOURCES		+= ${INTERCONNECT_SOURCES}
40endif
41endif
42endif
43
44# -----------------------------------------------------------------------------
45