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