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