Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Marek Vasut | e3d1026 | 2019-01-29 06:06:08 +0100 | [diff] [blame] | 7 | PROGRAMMABLE_RESET_ADDRESS := 0 |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 8 | COLD_BOOT_SINGLE_CPU := 1 |
| 9 | ARM_CCI_PRODUCT_ID := 500 |
| 10 | TRUSTED_BOARD_BOOT := 1 |
| 11 | RESET_TO_BL31 := 1 |
| 12 | GENERATE_COT := 1 |
| 13 | BL2_AT_EL3 := 1 |
Marek Vasut | 1bef575 | 2018-12-28 20:38:09 +0100 | [diff] [blame] | 14 | ENABLE_SVE_FOR_NS := 0 |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 15 | |
Marek Vasut | 8ed5c5c | 2019-02-12 00:09:46 +0100 | [diff] [blame] | 16 | CRASH_REPORTING := 1 |
| 17 | HANDLE_EA_EL3_FIRST := 1 |
| 18 | |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 19 | $(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT)) |
| 20 | |
| 21 | ifeq (${SPD},none) |
| 22 | SPD_NONE:=1 |
| 23 | $(eval $(call add_define,SPD_NONE)) |
| 24 | endif |
| 25 | |
| 26 | # LSI setting common define |
| 27 | RCAR_H3:=0 |
| 28 | RCAR_M3:=1 |
| 29 | RCAR_M3N:=2 |
| 30 | RCAR_E3:=3 |
| 31 | RCAR_H3N:=4 |
| 32 | RCAR_AUTO:=99 |
| 33 | $(eval $(call add_define,RCAR_H3)) |
| 34 | $(eval $(call add_define,RCAR_M3)) |
| 35 | $(eval $(call add_define,RCAR_M3N)) |
| 36 | $(eval $(call add_define,RCAR_E3)) |
| 37 | $(eval $(call add_define,RCAR_H3N)) |
| 38 | $(eval $(call add_define,RCAR_AUTO)) |
| 39 | RCAR_CUT_10:=0 |
| 40 | RCAR_CUT_11:=1 |
Marek Vasut | 3af2005 | 2019-02-25 14:57:08 +0100 | [diff] [blame^] | 41 | RCAR_CUT_13:=3 |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 42 | RCAR_CUT_20:=10 |
| 43 | RCAR_CUT_30:=20 |
| 44 | $(eval $(call add_define,RCAR_CUT_10)) |
| 45 | $(eval $(call add_define,RCAR_CUT_11)) |
Marek Vasut | 3af2005 | 2019-02-25 14:57:08 +0100 | [diff] [blame^] | 46 | $(eval $(call add_define,RCAR_CUT_13)) |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 47 | $(eval $(call add_define,RCAR_CUT_20)) |
| 48 | $(eval $(call add_define,RCAR_CUT_30)) |
| 49 | |
| 50 | ifndef LSI |
| 51 | $(error "Error: Unknown LSI. Please use LSI=<LSI name> to specify the LSI") |
| 52 | else |
| 53 | ifeq (${LSI},AUTO) |
| 54 | RCAR_LSI:=${RCAR_AUTO} |
| 55 | else ifeq (${LSI},H3) |
| 56 | RCAR_LSI:=${RCAR_H3} |
| 57 | ifndef LSI_CUT |
| 58 | # enable compatible function. |
| 59 | RCAR_LSI_CUT_COMPAT := 1 |
| 60 | $(eval $(call add_define,RCAR_LSI_CUT_COMPAT)) |
| 61 | else |
| 62 | # disable compatible function. |
| 63 | ifeq (${LSI_CUT},10) |
| 64 | RCAR_LSI_CUT:=0 |
| 65 | else ifeq (${LSI_CUT},11) |
| 66 | RCAR_LSI_CUT:=1 |
| 67 | else ifeq (${LSI_CUT},20) |
| 68 | RCAR_LSI_CUT:=10 |
| 69 | else ifeq (${LSI_CUT},30) |
| 70 | RCAR_LSI_CUT:=20 |
| 71 | else |
| 72 | $(error "Error: ${LSI_CUT} is not supported.") |
| 73 | endif |
| 74 | $(eval $(call add_define,RCAR_LSI_CUT)) |
| 75 | endif |
| 76 | else ifeq (${LSI},H3N) |
| 77 | RCAR_LSI:=${RCAR_H3N} |
| 78 | ifndef LSI_CUT |
| 79 | # enable compatible function. |
| 80 | RCAR_LSI_CUT_COMPAT := 1 |
| 81 | $(eval $(call add_define,RCAR_LSI_CUT_COMPAT)) |
| 82 | else |
| 83 | # disable compatible function. |
| 84 | ifeq (${LSI_CUT},30) |
| 85 | RCAR_LSI_CUT:=20 |
| 86 | else |
| 87 | $(error "Error: ${LSI_CUT} is not supported.") |
| 88 | endif |
| 89 | $(eval $(call add_define,RCAR_LSI_CUT)) |
| 90 | endif |
| 91 | else ifeq (${LSI},M3) |
| 92 | RCAR_LSI:=${RCAR_M3} |
| 93 | ifndef LSI_CUT |
| 94 | # enable compatible function. |
| 95 | RCAR_LSI_CUT_COMPAT := 1 |
| 96 | $(eval $(call add_define,RCAR_LSI_CUT_COMPAT)) |
| 97 | else |
| 98 | # disable compatible function. |
| 99 | ifeq (${LSI_CUT},10) |
| 100 | RCAR_LSI_CUT:=0 |
| 101 | else ifeq (${LSI_CUT},11) |
| 102 | RCAR_LSI_CUT:=1 |
Marek Vasut | 3af2005 | 2019-02-25 14:57:08 +0100 | [diff] [blame^] | 103 | else ifeq (${LSI_CUT},13) |
| 104 | RCAR_LSI_CUT:=3 |
| 105 | else ifeq (${LSI_CUT},30) |
| 106 | RCAR_LSI_CUT:=20 |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 107 | else |
| 108 | $(error "Error: ${LSI_CUT} is not supported.") |
| 109 | endif |
| 110 | $(eval $(call add_define,RCAR_LSI_CUT)) |
| 111 | endif |
| 112 | else ifeq (${LSI},M3N) |
| 113 | RCAR_LSI:=${RCAR_M3N} |
| 114 | ifndef LSI_CUT |
| 115 | # enable compatible function. |
| 116 | RCAR_LSI_CUT_COMPAT := 1 |
| 117 | $(eval $(call add_define,RCAR_LSI_CUT_COMPAT)) |
| 118 | else |
| 119 | # disable compatible function. |
| 120 | ifeq (${LSI_CUT},10) |
| 121 | RCAR_LSI_CUT:=0 |
| 122 | else ifeq (${LSI_CUT},11) |
| 123 | RCAR_LSI_CUT:=1 |
| 124 | else |
| 125 | $(error "Error: ${LSI_CUT} is not supported.") |
| 126 | endif |
| 127 | $(eval $(call add_define,RCAR_LSI_CUT)) |
| 128 | endif |
| 129 | else ifeq (${LSI},E3) |
| 130 | RCAR_LSI:=${RCAR_E3} |
| 131 | ifndef LSI_CUT |
| 132 | # enable compatible function. |
| 133 | RCAR_LSI_CUT_COMPAT := 1 |
| 134 | $(eval $(call add_define,RCAR_LSI_CUT_COMPAT)) |
| 135 | else |
| 136 | # disable compatible function. |
| 137 | ifeq (${LSI_CUT},10) |
| 138 | RCAR_LSI_CUT:=0 |
Marek Vasut | 3af2005 | 2019-02-25 14:57:08 +0100 | [diff] [blame^] | 139 | else ifeq (${LSI_CUT},11) |
| 140 | RCAR_LSI_CUT:=1 |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 141 | else |
| 142 | $(error "Error: ${LSI_CUT} is not supported.") |
| 143 | endif |
| 144 | $(eval $(call add_define,RCAR_LSI_CUT)) |
| 145 | endif |
| 146 | else |
| 147 | $(error "Error: ${LSI} is not supported.") |
| 148 | endif |
| 149 | $(eval $(call add_define,RCAR_LSI)) |
| 150 | endif |
| 151 | |
Jorge Ramirez-Ortiz | 87c0405 | 2018-11-19 19:26:56 +0100 | [diff] [blame] | 152 | # lock RPC HYPERFLASH access by default |
| 153 | # unlock to repogram the ATF firmware from u-boot |
| 154 | ifndef RCAR_RPC_HYPERFLASH_LOCKED |
| 155 | RCAR_RPC_HYPERFLASH_LOCKED := 1 |
| 156 | endif |
| 157 | $(eval $(call add_define,RCAR_RPC_HYPERFLASH_LOCKED)) |
| 158 | |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 159 | # Process RCAR_SECURE_BOOT flag |
| 160 | ifndef RCAR_SECURE_BOOT |
| 161 | RCAR_SECURE_BOOT := 1 |
| 162 | endif |
| 163 | $(eval $(call add_define,RCAR_SECURE_BOOT)) |
| 164 | |
| 165 | # Process RCAR_QOS_TYPE flag |
| 166 | ifndef RCAR_QOS_TYPE |
| 167 | RCAR_QOS_TYPE := 0 |
| 168 | endif |
| 169 | $(eval $(call add_define,RCAR_QOS_TYPE)) |
| 170 | |
| 171 | # Process RCAR_DRAM_SPLIT flag |
| 172 | ifndef RCAR_DRAM_SPLIT |
| 173 | RCAR_DRAM_SPLIT := 0 |
| 174 | endif |
| 175 | $(eval $(call add_define,RCAR_DRAM_SPLIT)) |
| 176 | |
| 177 | # Process RCAR_BL33_EXECUTION_EL flag |
| 178 | ifndef RCAR_BL33_EXECUTION_EL |
| 179 | RCAR_BL33_EXECUTION_EL := 0 |
| 180 | endif |
| 181 | $(eval $(call add_define,RCAR_BL33_EXECUTION_EL)) |
| 182 | |
| 183 | # Process RCAR_AVS_SETTING_ENABLE flag |
| 184 | ifeq (${RCAR_AVS_SETTING_ENABLE},0) |
| 185 | AVS_SETTING_ENABLE := 0 |
| 186 | else |
| 187 | AVS_SETTING_ENABLE := 1 |
| 188 | endif |
| 189 | $(eval $(call add_define,AVS_SETTING_ENABLE)) |
| 190 | |
| 191 | # Process RCAR_LOSSY_ENABLE flag |
| 192 | ifndef RCAR_LOSSY_ENABLE |
| 193 | RCAR_LOSSY_ENABLE := 0 |
| 194 | endif |
| 195 | $(eval $(call add_define,RCAR_LOSSY_ENABLE)) |
| 196 | |
| 197 | # Process LIFEC_DBSC_PROTECT_ENABLE flag |
| 198 | ifndef LIFEC_DBSC_PROTECT_ENABLE |
| 199 | LIFEC_DBSC_PROTECT_ENABLE := 1 |
| 200 | endif |
| 201 | $(eval $(call add_define,LIFEC_DBSC_PROTECT_ENABLE)) |
| 202 | |
| 203 | # Process PMIC_ROHM_BD9571 flag |
| 204 | ifndef PMIC_ROHM_BD9571 |
| 205 | PMIC_ROHM_BD9571 := 1 |
| 206 | endif |
| 207 | $(eval $(call add_define,PMIC_ROHM_BD9571)) |
| 208 | |
| 209 | # Process PMIC_LEVEL_MODE flag |
| 210 | ifndef PMIC_LEVEL_MODE |
| 211 | PMIC_LEVEL_MODE := 1 |
| 212 | endif |
| 213 | $(eval $(call add_define,PMIC_LEVEL_MODE)) |
| 214 | |
| 215 | # Process RCAR_GEN3_ULCB flag |
| 216 | ifndef RCAR_GEN3_ULCB |
| 217 | RCAR_GEN3_ULCB := 0 |
| 218 | endif |
| 219 | ifeq (${RCAR_GEN3_ULCB},1) |
| 220 | BOARD_DEFAULT := 0x10 |
| 221 | $(eval $(call add_define,BOARD_DEFAULT)) |
| 222 | endif |
| 223 | $(eval $(call add_define,RCAR_GEN3_ULCB)) |
| 224 | |
| 225 | # Process RCAR_REF_INT flag |
| 226 | ifndef RCAR_REF_INT |
| 227 | RCAR_REF_INT :=0 |
| 228 | endif |
| 229 | $(eval $(call add_define,RCAR_REF_INT)) |
| 230 | |
| 231 | # Process RCAR_REWT_TRAINING flag |
| 232 | ifndef RCAR_REWT_TRAINING |
| 233 | RCAR_REWT_TRAINING := 0 |
| 234 | endif |
| 235 | $(eval $(call add_define,RCAR_REWT_TRAINING)) |
| 236 | |
| 237 | # Process RCAR_SYSTEM_SUSPEND flag |
| 238 | ifndef RCAR_SYSTEM_SUSPEND |
| 239 | RCAR_SYSTEM_SUSPEND := 1 |
| 240 | endif |
| 241 | $(eval $(call add_define,RCAR_SYSTEM_SUSPEND)) |
| 242 | |
| 243 | # SYSTEM_SUSPEND requires power control of PMIC etc. |
| 244 | # When executing SYSTEM_SUSPEND other than Salvator-X, Salvator-XS and Ebisu, |
| 245 | # processing equivalent to that implemented in PMIC_ROHM_BD9571 is necessary. |
| 246 | ifeq (${RCAR_SYSTEM_SUSPEND},1) |
| 247 | ifeq (${PMIC_ROHM_BD9571},0) |
| 248 | $(error "Error: When you want RCAR_SYSTEM_SUSPEND to be enable, please also set PMIC_ROHM_BD9571 to enable.") |
| 249 | endif |
| 250 | endif |
| 251 | |
| 252 | # Process RCAR_DRAM_LPDDR4_MEMCONF flag |
| 253 | ifndef RCAR_DRAM_LPDDR4_MEMCONF |
| 254 | RCAR_DRAM_LPDDR4_MEMCONF :=1 |
| 255 | endif |
| 256 | $(eval $(call add_define,RCAR_DRAM_LPDDR4_MEMCONF)) |
| 257 | |
| 258 | # Process RCAR_DRAM_DDR3L_MEMCONF flag |
| 259 | ifndef RCAR_DRAM_DDR3L_MEMCONF |
| 260 | RCAR_DRAM_DDR3L_MEMCONF :=1 |
| 261 | endif |
| 262 | $(eval $(call add_define,RCAR_DRAM_DDR3L_MEMCONF)) |
| 263 | |
| 264 | # Process RCAR_DRAM_DDR3L_MEMDUAL flag |
| 265 | ifndef RCAR_DRAM_DDR3L_MEMDUAL |
| 266 | RCAR_DRAM_DDR3L_MEMDUAL :=1 |
| 267 | endif |
| 268 | $(eval $(call add_define,RCAR_DRAM_DDR3L_MEMDUAL)) |
| 269 | |
| 270 | # Process RCAR_BL33_ARG0 flag |
| 271 | ifdef RCAR_BL33_ARG0 |
| 272 | $(eval $(call add_define,RCAR_BL33_ARG0)) |
| 273 | endif |
| 274 | |
| 275 | #Process RCAR_BL2_DCACHE flag |
| 276 | ifndef RCAR_BL2_DCACHE |
| 277 | RCAR_BL2_DCACHE := 0 |
| 278 | endif |
| 279 | $(eval $(call add_define,RCAR_BL2_DCACHE)) |
| 280 | |
| 281 | # Process RCAR_DRAM_CHANNEL flag |
| 282 | ifndef RCAR_DRAM_CHANNEL |
| 283 | RCAR_DRAM_CHANNEL :=15 |
| 284 | endif |
| 285 | $(eval $(call add_define,RCAR_DRAM_CHANNEL)) |
| 286 | |
| 287 | #Process RCAR_SYSTEM_RESET_KEEPON_DDR flag |
| 288 | ifndef RCAR_SYSTEM_RESET_KEEPON_DDR |
| 289 | RCAR_SYSTEM_RESET_KEEPON_DDR := 0 |
| 290 | endif |
| 291 | $(eval $(call add_define,RCAR_SYSTEM_RESET_KEEPON_DDR)) |
| 292 | |
| 293 | # RCAR_SYSTEM_RESET_KEEPON_DDR requires power control of PMIC etc. |
| 294 | # When executing SYSTEM_SUSPEND other than Salvator-X, Salvator-XS and Ebisu, |
| 295 | # processing equivalent to that implemented in PMIC_ROHM_BD9571 is necessary. |
| 296 | # Also, it is necessary to enable RCAR_SYSTEM_SUSPEND. |
| 297 | ifeq (${RCAR_SYSTEM_RESET_KEEPON_DDR},1) |
| 298 | ifeq (${PMIC_ROHM_BD9571},0) |
| 299 | $(error "Error: When you want RCAR_SYSTEM_RESET_KEEPON_DDR to be enable, please also set PMIC_ROHM_BD9571 to enable.") |
| 300 | endif |
| 301 | ifeq (${RCAR_SYSTEM_SUSPEND},0) |
| 302 | $(error "Error: When you want RCAR_SYSTEM_RESET_KEEPON_DDR to be enable, please also set RCAR_SYSTEM_SUSPEND to enable.") |
| 303 | endif |
| 304 | endif |
| 305 | |
| 306 | # Enable workarounds for selected Cortex-A53 erratas. |
| 307 | ERRATA_A53_835769 := 1 |
| 308 | ERRATA_A53_843419 := 1 |
| 309 | ERRATA_A53_855873 := 1 |
| 310 | |
| 311 | # Enable workarounds for selected Cortex-A57 erratas. |
| 312 | ERRATA_A57_859972 := 1 |
| 313 | ERRATA_A57_813419 := 1 |
| 314 | |
Jorge Ramirez-Ortiz | 47503d2 | 2018-09-23 09:36:52 +0200 | [diff] [blame] | 315 | include drivers/staging/renesas/rcar/ddr/ddr.mk |
| 316 | include drivers/staging/renesas/rcar/qos/qos.mk |
| 317 | include drivers/staging/renesas/rcar/pfc/pfc.mk |
Marek Vasut | 93c85fc | 2018-10-02 20:45:18 +0200 | [diff] [blame] | 318 | include lib/libfdt/libfdt.mk |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 319 | |
Antonio Nino Diaz | 50a4d1a | 2019-02-01 12:22:22 +0000 | [diff] [blame] | 320 | PLAT_INCLUDES := -Idrivers/staging/renesas/rcar/ddr \ |
Jorge Ramirez-Ortiz | 47503d2 | 2018-09-23 09:36:52 +0200 | [diff] [blame] | 321 | -Idrivers/staging/renesas/rcar/qos \ |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 322 | -Idrivers/renesas/rcar/iic_dvfs \ |
| 323 | -Idrivers/renesas/rcar/board \ |
Marek Vasut | 38ec9e5 | 2018-12-28 11:26:03 +0100 | [diff] [blame] | 324 | -Idrivers/renesas/rcar/cpld/ \ |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 325 | -Idrivers/renesas/rcar/avs \ |
| 326 | -Idrivers/renesas/rcar/delay \ |
| 327 | -Idrivers/renesas/rcar/rom \ |
| 328 | -Idrivers/renesas/rcar/scif \ |
| 329 | -Idrivers/renesas/rcar/emmc \ |
| 330 | -Idrivers/renesas/rcar/pwrc \ |
| 331 | -Idrivers/renesas/rcar/io \ |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 332 | -Iplat/renesas/rcar/include/registers \ |
| 333 | -Iplat/renesas/rcar/include \ |
| 334 | -Iplat/renesas/rcar |
| 335 | |
Marek Vasut | 8ed5c5c | 2019-02-12 00:09:46 +0100 | [diff] [blame] | 336 | PLAT_BL_COMMON_SOURCES := drivers/renesas/rcar/iic_dvfs/iic_dvfs.c \ |
| 337 | plat/renesas/rcar/rcar_common.c |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 338 | |
| 339 | RCAR_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ |
| 340 | drivers/arm/gic/v2/gicv2_main.c \ |
| 341 | drivers/arm/gic/v2/gicv2_helpers.c \ |
| 342 | plat/common/plat_gicv2.c |
| 343 | |
| 344 | BL2_SOURCES += ${RCAR_GIC_SOURCES} \ |
| 345 | lib/cpus/aarch64/cortex_a53.S \ |
| 346 | lib/cpus/aarch64/cortex_a57.S \ |
Marek Vasut | 93c85fc | 2018-10-02 20:45:18 +0200 | [diff] [blame] | 347 | ${LIBFDT_SRCS} \ |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 348 | common/desc_image_load.c \ |
| 349 | plat/renesas/rcar/aarch64/platform_common.c \ |
| 350 | plat/renesas/rcar/aarch64/plat_helpers.S \ |
| 351 | plat/renesas/rcar/bl2_interrupt_error.c \ |
| 352 | plat/renesas/rcar/bl2_secure_setting.c \ |
| 353 | plat/renesas/rcar/bl2_plat_setup.c \ |
| 354 | plat/renesas/rcar/plat_storage.c \ |
| 355 | plat/renesas/rcar/bl2_plat_mem_params_desc.c \ |
| 356 | plat/renesas/rcar/plat_image_load.c \ |
| 357 | plat/renesas/rcar/bl2_cpg_init.c \ |
| 358 | drivers/renesas/rcar/console/rcar_printf.c \ |
| 359 | drivers/renesas/rcar/scif/scif.S \ |
| 360 | drivers/renesas/rcar/common.c \ |
| 361 | drivers/renesas/rcar/io/io_emmcdrv.c \ |
| 362 | drivers/renesas/rcar/io/io_memdrv.c \ |
| 363 | drivers/renesas/rcar/io/io_rcar.c \ |
| 364 | drivers/renesas/rcar/auth/auth_mod.c \ |
| 365 | drivers/renesas/rcar/rpc/rpc_driver.c \ |
| 366 | drivers/renesas/rcar/dma/dma_driver.c \ |
| 367 | drivers/renesas/rcar/avs/avs_driver.c \ |
Marek Vasut | 1778b41 | 2018-12-26 15:57:08 +0100 | [diff] [blame] | 368 | drivers/renesas/rcar/delay/micro_delay.c \ |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 369 | drivers/renesas/rcar/emmc/emmc_interrupt.c \ |
| 370 | drivers/renesas/rcar/emmc/emmc_utility.c \ |
| 371 | drivers/renesas/rcar/emmc/emmc_mount.c \ |
| 372 | drivers/renesas/rcar/emmc/emmc_init.c \ |
| 373 | drivers/renesas/rcar/emmc/emmc_read.c \ |
| 374 | drivers/renesas/rcar/emmc/emmc_cmd.c \ |
| 375 | drivers/renesas/rcar/watchdog/swdt.c \ |
| 376 | drivers/renesas/rcar/rom/rom_api.c \ |
| 377 | drivers/renesas/rcar/board/board.c \ |
| 378 | drivers/io/io_storage.c |
| 379 | |
| 380 | BL31_SOURCES += ${RCAR_GIC_SOURCES} \ |
| 381 | lib/cpus/aarch64/cortex_a53.S \ |
| 382 | lib/cpus/aarch64/cortex_a57.S \ |
| 383 | plat/common/plat_psci_common.c \ |
| 384 | plat/renesas/rcar/plat_topology.c \ |
| 385 | plat/renesas/rcar/aarch64/plat_helpers.S \ |
| 386 | plat/renesas/rcar/aarch64/platform_common.c \ |
| 387 | plat/renesas/rcar/bl31_plat_setup.c \ |
| 388 | plat/renesas/rcar/plat_pm.c \ |
| 389 | drivers/renesas/rcar/console/rcar_console.S \ |
| 390 | drivers/renesas/rcar/console/rcar_printf.c \ |
Marek Vasut | 4bc543c | 2018-12-28 20:15:33 +0100 | [diff] [blame] | 391 | drivers/renesas/rcar/delay/micro_delay.c \ |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 392 | drivers/renesas/rcar/pwrc/call_sram.S \ |
| 393 | drivers/renesas/rcar/pwrc/pwrc.c \ |
| 394 | drivers/renesas/rcar/common.c \ |
| 395 | drivers/arm/cci/cci.c |
| 396 | |
| 397 | ifeq (${RCAR_GEN3_ULCB},1) |
| 398 | BL31_SOURCES += drivers/renesas/rcar/cpld/ulcb_cpld.c |
| 399 | endif |
| 400 | |
| 401 | include lib/xlat_tables_v2/xlat_tables.mk |
| 402 | include drivers/auth/mbedtls/mbedtls_crypto.mk |
| 403 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} |
| 404 | |
| 405 | # build the layout images for the bootrom and the necessary srecords |
| 406 | rcar: rcar_layout_tool rcar_srecord |
| 407 | distclean realclean clean: clean_layout_tool clean_srecord |
| 408 | |
| 409 | # layout images |
| 410 | LAYOUT_TOOLPATH ?= tools/renesas/rcar_layout_create |
| 411 | |
| 412 | clean_layout_tool: |
| 413 | @echo "clean layout tool" |
| 414 | ${Q}${MAKE} -C ${LAYOUT_TOOLPATH} clean |
| 415 | |
| 416 | .PHONY: rcar_layout_tool |
| 417 | rcar_layout_tool: |
| 418 | @echo "generating layout srecs" |
| 419 | ${Q}${MAKE} CPPFLAGS="-D=AARCH64" --no-print-directory -C ${LAYOUT_TOOLPATH} |
| 420 | |
| 421 | # srecords |
| 422 | SREC_PATH = ${BUILD_PLAT} |
| 423 | BL2_ELF_SRC = ${SREC_PATH}/bl2/bl2.elf |
| 424 | BL31_ELF_SRC = ${SREC_PATH}/bl31/bl31.elf |
| 425 | |
| 426 | clean_srecord: |
| 427 | @echo "clean bl2 and bl31 srecs" |
| 428 | rm -f ${SREC_PATH}/bl2.srec ${SREC_PATH}/bl31.srec |
| 429 | |
| 430 | .PHONY: rcar_srecord |
Marek Vasut | 7043fce | 2018-12-31 19:47:37 +0100 | [diff] [blame] | 431 | rcar_srecord: $(BL2_ELF_SRC) $(BL31_ELF_SRC) |
Jorge Ramirez-Ortiz | bf084dc | 2018-09-23 09:36:13 +0200 | [diff] [blame] | 432 | @echo "generating srec: ${SREC_PATH}/bl2.srec" |
| 433 | $(Q)$(OC) -O srec --srec-forceS3 ${BL2_ELF_SRC} ${SREC_PATH}/bl2.srec |
| 434 | @echo "generating srec: ${SREC_PATH}/bl31.srec" |
| 435 | $(Q)$(OC) -O srec --srec-forceS3 ${BL31_ELF_SRC} ${SREC_PATH}/bl31.srec |
| 436 | |