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