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