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