blob: 9ac26af3299291e7a5aed883dba8d4c5fc02fd38 [file] [log] [blame]
Sheetal Tigadoli13680c92019-12-13 10:39:06 +05301#
2# Copyright (c) 2015 - 2020, Broadcom
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7PLAT_BL_COMMON_SOURCES += plat/brcm/board/common/board_common.c
8
9# If no board config makefile, do not include it
10ifneq (${BOARD_CFG},)
11BOARD_CFG_MAKE := $(shell find plat/brcm/board/${PLAT} -name '${BOARD_CFG}.mk')
12$(eval $(call add_define,BOARD_CFG))
13ifneq (${BOARD_CFG_MAKE},)
14$(info Including ${BOARD_CFG_MAKE})
15include ${BOARD_CFG_MAKE}
16else
17$(error Error: File ${BOARD_CFG}.mk not found in plat/brcm/board/${PLAT})
18endif
19endif
20
21# To compile with highest log level (VERBOSE) set value to 50
22LOG_LEVEL := 40
23
24# Use custom generic timer clock
25ifneq (${GENTIMER_ACTUAL_CLOCK},)
26$(info Using GENTIMER_ACTUAL_CLOCK=$(GENTIMER_ACTUAL_CLOCK))
27SYSCNT_FREQ := $(GENTIMER_ACTUAL_CLOCK)
28$(eval $(call add_define,SYSCNT_FREQ))
29endif
30
31ifeq (${STANDALONE_BL2},yes)
32$(eval $(call add_define,MMU_DISABLED))
33endif
34
35# BL2 XIP from QSPI
36RUN_BL2_FROM_QSPI := 0
37ifeq (${RUN_BL2_FROM_QSPI},1)
38$(eval $(call add_define,RUN_BL2_FROM_QSPI))
39endif
40
41# Use CRMU SRAM from iHOST
42ifneq (${USE_CRMU_SRAM},)
43$(eval $(call add_define,USE_CRMU_SRAM))
44endif
45
46# On BRCM platforms, separate the code and read-only data sections to allow
47# mapping the former as executable and the latter as execute-never.
48SEPARATE_CODE_AND_RODATA := 1
49
50# Use generic OID definition (tbbr_oid.h)
51USE_TBBR_DEFS := 1
52
53PLAT_INCLUDES += -Iplat/brcm/board/common
54
55PLAT_BL_COMMON_SOURCES += plat/brcm/common/brcm_common.c \
56 plat/brcm/board/common/cmn_sec.c \
57 plat/brcm/board/common/bcm_console.c \
58 plat/brcm/board/common/plat_setup.c \
59 plat/brcm/board/common/platform_common.c \
60 drivers/arm/sp804/sp804_delay_timer.c \
61 drivers/delay_timer/delay_timer.c \
62 drivers/io/io_fip.c \
63 drivers/io/io_memmap.c \
64 drivers/io/io_storage.c \
65 plat/brcm/common/brcm_io_storage.c \
66 plat/brcm/board/common/err.c \
67 drivers/arm/sp805/sp805.c
68
69BL2_SOURCES += plat/brcm/common/brcm_bl2_mem_params_desc.c \
70 plat/brcm/common/brcm_image_load.c \
71 common/desc_image_load.c
72
73BL2_SOURCES += plat/brcm/common/brcm_bl2_setup.c
74
75# Use translation tables library v1 by default
76ARM_XLAT_TABLES_LIB_V1 := 1
77ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1)
78$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
79$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
80PLAT_BL_COMMON_SOURCES += lib/xlat_tables/aarch64/xlat_tables.c \
81 lib/xlat_tables/xlat_tables_common.c
82endif