Sheetal Tigadoli | 13680c9 | 2019-12-13 10:39:06 +0530 | [diff] [blame^] | 1 | # |
| 2 | # Copyright (c) 2015 - 2020, Broadcom |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | PLAT_BL_COMMON_SOURCES += plat/brcm/board/common/board_common.c |
| 8 | |
| 9 | # If no board config makefile, do not include it |
| 10 | ifneq (${BOARD_CFG},) |
| 11 | BOARD_CFG_MAKE := $(shell find plat/brcm/board/${PLAT} -name '${BOARD_CFG}.mk') |
| 12 | $(eval $(call add_define,BOARD_CFG)) |
| 13 | ifneq (${BOARD_CFG_MAKE},) |
| 14 | $(info Including ${BOARD_CFG_MAKE}) |
| 15 | include ${BOARD_CFG_MAKE} |
| 16 | else |
| 17 | $(error Error: File ${BOARD_CFG}.mk not found in plat/brcm/board/${PLAT}) |
| 18 | endif |
| 19 | endif |
| 20 | |
| 21 | # To compile with highest log level (VERBOSE) set value to 50 |
| 22 | LOG_LEVEL := 40 |
| 23 | |
| 24 | # Use custom generic timer clock |
| 25 | ifneq (${GENTIMER_ACTUAL_CLOCK},) |
| 26 | $(info Using GENTIMER_ACTUAL_CLOCK=$(GENTIMER_ACTUAL_CLOCK)) |
| 27 | SYSCNT_FREQ := $(GENTIMER_ACTUAL_CLOCK) |
| 28 | $(eval $(call add_define,SYSCNT_FREQ)) |
| 29 | endif |
| 30 | |
| 31 | ifeq (${STANDALONE_BL2},yes) |
| 32 | $(eval $(call add_define,MMU_DISABLED)) |
| 33 | endif |
| 34 | |
| 35 | # BL2 XIP from QSPI |
| 36 | RUN_BL2_FROM_QSPI := 0 |
| 37 | ifeq (${RUN_BL2_FROM_QSPI},1) |
| 38 | $(eval $(call add_define,RUN_BL2_FROM_QSPI)) |
| 39 | endif |
| 40 | |
| 41 | # Use CRMU SRAM from iHOST |
| 42 | ifneq (${USE_CRMU_SRAM},) |
| 43 | $(eval $(call add_define,USE_CRMU_SRAM)) |
| 44 | endif |
| 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. |
| 48 | SEPARATE_CODE_AND_RODATA := 1 |
| 49 | |
| 50 | # Use generic OID definition (tbbr_oid.h) |
| 51 | USE_TBBR_DEFS := 1 |
| 52 | |
| 53 | PLAT_INCLUDES += -Iplat/brcm/board/common |
| 54 | |
| 55 | PLAT_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 | |
| 69 | BL2_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 | |
| 73 | BL2_SOURCES += plat/brcm/common/brcm_bl2_setup.c |
| 74 | |
| 75 | # Use translation tables library v1 by default |
| 76 | ARM_XLAT_TABLES_LIB_V1 := 1 |
| 77 | ifeq (${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)) |
| 80 | PLAT_BL_COMMON_SOURCES += lib/xlat_tables/aarch64/xlat_tables.c \ |
| 81 | lib/xlat_tables/xlat_tables_common.c |
| 82 | endif |