blob: 0d88d658e917f026aed49836e2291d51e246162d [file] [log] [blame]
Biju Das4ec2d8f2020-12-16 08:57:59 +00001#
Toshiyuki Ogasaharaa2f9c182021-07-12 19:43:45 +09002# Copyright (c) 2018-2021, Renesas Electronics Corporation. All rights reserved.
Biju Das4ec2d8f2020-12-16 08:57:59 +00003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7PROGRAMMABLE_RESET_ADDRESS := 0
8COLD_BOOT_SINGLE_CPU := 1
9ARM_CCI_PRODUCT_ID := 500
10TRUSTED_BOARD_BOOT := 1
11RESET_TO_BL31 := 1
12GENERATE_COT := 1
13BL2_AT_EL3 := 1
14ENABLE_SVE_FOR_NS := 0
15MULTI_CONSOLE_API := 1
16
17CRASH_REPORTING := 1
18HANDLE_EA_EL3_FIRST := 1
19
20$(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT))
21
22ifeq (${SPD},none)
23 SPD_NONE:=1
24 $(eval $(call add_define,SPD_NONE))
25endif
26
27# LSI setting common define
28RCAR_H3:=0
29RCAR_M3:=1
30RCAR_M3N:=2
31RCAR_E3:=3
32RCAR_H3N:=4
33RCAR_D3:=5
34RCAR_V3M:=6
35RCAR_AUTO:=99
Biju Das54f6a432020-12-07 16:31:01 +000036RZ_G2M:=100
Lad Prabhakar9c86f412021-04-19 16:59:55 +010037RZ_G2H:=101
Lad Prabhakared2e11d2021-04-19 17:03:56 +010038RZ_G2N:=102
Lad Prabhakar83472842021-03-19 10:53:23 +000039RZ_G2E:=103
Biju Das4ec2d8f2020-12-16 08:57:59 +000040$(eval $(call add_define,RCAR_H3))
41$(eval $(call add_define,RCAR_M3))
42$(eval $(call add_define,RCAR_M3N))
43$(eval $(call add_define,RCAR_E3))
44$(eval $(call add_define,RCAR_H3N))
45$(eval $(call add_define,RCAR_D3))
46$(eval $(call add_define,RCAR_V3M))
47$(eval $(call add_define,RCAR_AUTO))
Biju Das54f6a432020-12-07 16:31:01 +000048$(eval $(call add_define,RZ_G2M))
Lad Prabhakar9c86f412021-04-19 16:59:55 +010049$(eval $(call add_define,RZ_G2H))
Lad Prabhakared2e11d2021-04-19 17:03:56 +010050$(eval $(call add_define,RZ_G2N))
Lad Prabhakar83472842021-03-19 10:53:23 +000051$(eval $(call add_define,RZ_G2E))
Biju Das54f6a432020-12-07 16:31:01 +000052
Biju Das4ec2d8f2020-12-16 08:57:59 +000053RCAR_CUT_10:=0
54RCAR_CUT_11:=1
55RCAR_CUT_13:=3
56RCAR_CUT_20:=10
57RCAR_CUT_30:=20
58$(eval $(call add_define,RCAR_CUT_10))
59$(eval $(call add_define,RCAR_CUT_11))
60$(eval $(call add_define,RCAR_CUT_13))
61$(eval $(call add_define,RCAR_CUT_20))
62$(eval $(call add_define,RCAR_CUT_30))
63
64# Enable workarounds for selected Cortex-A53 erratas.
65ERRATA_A53_835769 := 1
66ERRATA_A53_843419 := 1
67ERRATA_A53_855873 := 1
Toshiyuki Ogasahara44289fb2021-07-12 19:28:58 +090068ERRATA_A53_1530924 := 1
Biju Das4ec2d8f2020-12-16 08:57:59 +000069
70# Enable workarounds for selected Cortex-A57 erratas.
71ERRATA_A57_859972 := 1
72ERRATA_A57_813419 := 1
Toshiyuki Ogasahara44289fb2021-07-12 19:28:58 +090073ERRATA_A57_1319537 := 1
Biju Das4ec2d8f2020-12-16 08:57:59 +000074
75PLAT_INCLUDES := -Iplat/renesas/common/include/registers \
76 -Iplat/renesas/common/include \
77 -Iplat/renesas/common
78
Biju Das5cd4e332020-12-16 09:43:41 +000079PLAT_BL_COMMON_SOURCES := drivers/renesas/common/iic_dvfs/iic_dvfs.c \
80 plat/renesas/common/rcar_common.c
81
Toshiyuki Ogasaharaa2f9c182021-07-12 19:43:45 +090082include drivers/arm/gic/v2/gicv2.mk
83RCAR_GIC_SOURCES := ${GICV2_SOURCES} \
Biju Das4ec2d8f2020-12-16 08:57:59 +000084 plat/common/plat_gicv2.c
85
86BL2_SOURCES += ${RCAR_GIC_SOURCES} \
87 lib/cpus/aarch64/cortex_a53.S \
88 lib/cpus/aarch64/cortex_a57.S \
89 ${LIBFDT_SRCS} \
90 common/desc_image_load.c \
Biju Dasa19da322020-12-16 11:21:33 +000091 plat/renesas/common/aarch64/platform_common.c \
92 plat/renesas/common/aarch64/plat_helpers.S \
Biju Das45803282020-12-16 11:28:07 +000093 plat/renesas/common/bl2_interrupt_error.c \
94 plat/renesas/common/bl2_secure_setting.c \
95 plat/renesas/common/plat_storage.c \
96 plat/renesas/common/bl2_plat_mem_params_desc.c \
97 plat/renesas/common/plat_image_load.c \
98 plat/renesas/common/bl2_cpg_init.c \
Biju Das73e52b82020-12-16 10:36:17 +000099 drivers/renesas/common/console/rcar_printf.c \
100 drivers/renesas/common/scif/scif.S \
Biju Das4ec2d8f2020-12-16 08:57:59 +0000101 drivers/renesas/common/common.c \
Biju Das030163c2020-12-16 10:05:41 +0000102 drivers/renesas/common/io/io_emmcdrv.c \
103 drivers/renesas/common/io/io_memdrv.c \
104 drivers/renesas/common/io/io_rcar.c \
Biju Dasc9cf87a2020-12-16 11:11:09 +0000105 drivers/renesas/common/auth/auth_mod.c \
Biju Dasf0f30b02020-12-16 11:15:33 +0000106 drivers/renesas/common/rpc/rpc_driver.c \
Biju Dasc951a332020-12-16 11:02:59 +0000107 drivers/renesas/common/dma/dma_driver.c \
Biju Das0520cdf2020-12-16 11:13:06 +0000108 drivers/renesas/common/avs/avs_driver.c \
Biju Dasee13d8f2020-12-16 10:46:36 +0000109 drivers/renesas/common/delay/micro_delay.c \
Biju Das4c325592020-12-16 09:53:19 +0000110 drivers/renesas/common/emmc/emmc_interrupt.c \
111 drivers/renesas/common/emmc/emmc_utility.c \
112 drivers/renesas/common/emmc/emmc_mount.c \
113 drivers/renesas/common/emmc/emmc_init.c \
114 drivers/renesas/common/emmc/emmc_read.c \
115 drivers/renesas/common/emmc/emmc_cmd.c \
Biju Das50758f22020-12-16 11:00:21 +0000116 drivers/renesas/common/watchdog/swdt.c \
Biju Das907c8652020-12-16 10:56:03 +0000117 drivers/renesas/common/rom/rom_api.c \
Biju Das4ec2d8f2020-12-16 08:57:59 +0000118 drivers/io/io_storage.c
119
120BL31_SOURCES += ${RCAR_GIC_SOURCES} \
121 lib/cpus/aarch64/cortex_a53.S \
122 lib/cpus/aarch64/cortex_a57.S \
123 plat/common/plat_psci_common.c \
Biju Das45803282020-12-16 11:28:07 +0000124 plat/renesas/common/plat_topology.c \
Biju Dasa19da322020-12-16 11:21:33 +0000125 plat/renesas/common/aarch64/plat_helpers.S \
126 plat/renesas/common/aarch64/platform_common.c \
Biju Das45803282020-12-16 11:28:07 +0000127 plat/renesas/common/bl31_plat_setup.c \
128 plat/renesas/common/plat_pm.c \
Biju Das73e52b82020-12-16 10:36:17 +0000129 drivers/renesas/common/console/rcar_console.S \
130 drivers/renesas/common/console/rcar_printf.c \
Biju Dasee13d8f2020-12-16 10:46:36 +0000131 drivers/renesas/common/delay/micro_delay.c \
Biju Das112cc422020-12-16 10:27:45 +0000132 drivers/renesas/common/pwrc/call_sram.S \
133 drivers/renesas/common/pwrc/pwrc.c \
Biju Das4ec2d8f2020-12-16 08:57:59 +0000134 drivers/renesas/common/common.c \
135 drivers/arm/cci/cci.c
Biju Das5cd4e332020-12-16 09:43:41 +0000136
137include lib/xlat_tables_v2/xlat_tables.mk
138include drivers/auth/mbedtls/mbedtls_crypto.mk
139PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}