blob: 5f3c6e349344bcbab9b08bd3ecb109a05bdd65d9 [file] [log] [blame]
Pankaj Gupta6b36c1b2020-12-09 14:02:38 +05301#
Ghennadi Procopciuc28d692a2024-01-26 15:25:24 +02002# Copyright 2021-2024 NXP
Pankaj Gupta6b36c1b2020-12-09 14:02:38 +05303#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#
7#------------------------------------------------------------------------------
8#
9# Select the CORE files
10#
11# -----------------------------------------------------------------------------
12
13ifeq (${ADD_CONSOLE},)
14
15ADD_CONSOLE := 1
16
Pankaj Gupta7834b462021-03-25 15:15:52 +053017PLAT_INCLUDES += -I$(PLAT_DRIVERS_INCLUDE_PATH)/console
Pankaj Gupta6b36c1b2020-12-09 14:02:38 +053018
19ifeq ($(CONSOLE), NS16550)
20NXP_CONSOLE := NS16550
21
22$(eval $(call add_define_val,NXP_CONSOLE,${NXP_CONSOLE}))
23
24CONSOLE_SOURCES := $(PLAT_DRIVERS_PATH)/console/16550_console.S \
25 $(PLAT_DRIVERS_PATH)/console/console_16550.c
26else
27ifeq ($(CONSOLE), PL011)
28CONSOLE_SOURCES := drivers/arm/pl011/aarch64/pl011_console.S \
29 ${PLAT_DRIVERS_PATH}/console/console_pl011.c
30else
Ghennadi Procopciuc28d692a2024-01-26 15:25:24 +020031ifeq ($(CONSOLE), LINFLEX)
32CONSOLE_SOURCES := ${PLAT_DRIVERS_PATH}/console/linflex_console.S
33else
Pankaj Gupta6b36c1b2020-12-09 14:02:38 +053034 $(error -> CONSOLE not set!)
35endif
Ghennadi Procopciuc28d692a2024-01-26 15:25:24 +020036
37endif
Pankaj Gupta6b36c1b2020-12-09 14:02:38 +053038endif
39
40ifeq (${BL_COMM_CONSOLE_NEEDED},yes)
41BL_COMMON_SOURCES += ${CONSOLE_SOURCES}
42else
43ifeq (${BL2_CONSOLE_NEEDED},yes)
44BL2_SOURCES += ${CONSOLE_SOURCES}
45endif
46ifeq (${BL31_CONSOLE_NEEDED},yes)
47BL31_SOURCES += ${CONSOLE_SOURCES}
48endif
49endif
50endif
51# -----------------------------------------------------------------------------