xref: /arm-trusted-firmware/plat/renesas/rcar/platform.mk (revision 91f16700b400a8c0651d24a598fc48ee2997a0d7)
1*91f16700Schasinglulu#
2*91f16700Schasinglulu# Copyright (c) 2018-2021, Renesas Electronics Corporation. All rights reserved.
3*91f16700Schasinglulu#
4*91f16700Schasinglulu# SPDX-License-Identifier: BSD-3-Clause
5*91f16700Schasinglulu#
6*91f16700Schasinglulu
7*91f16700Schasingluluinclude plat/renesas/common/common.mk
8*91f16700Schasinglulu
9*91f16700Schasingluluifndef LSI
10*91f16700Schasinglulu  $(error "Error: Unknown LSI. Please use LSI=<LSI name> to specify the LSI")
11*91f16700Schasingluluelse
12*91f16700Schasinglulu  ifeq (${LSI},AUTO)
13*91f16700Schasinglulu    RCAR_LSI:=${RCAR_AUTO}
14*91f16700Schasinglulu  else ifeq (${LSI},H3)
15*91f16700Schasinglulu    RCAR_LSI:=${RCAR_H3}
16*91f16700Schasinglulu    ifndef LSI_CUT
17*91f16700Schasinglulu      # enable compatible function.
18*91f16700Schasinglulu      RCAR_LSI_CUT_COMPAT := 1
19*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT_COMPAT))
20*91f16700Schasinglulu    else
21*91f16700Schasinglulu      # disable compatible function.
22*91f16700Schasinglulu      ifeq (${LSI_CUT},10)
23*91f16700Schasinglulu        RCAR_LSI_CUT:=0
24*91f16700Schasinglulu      else ifeq (${LSI_CUT},11)
25*91f16700Schasinglulu        RCAR_LSI_CUT:=1
26*91f16700Schasinglulu      else ifeq (${LSI_CUT},20)
27*91f16700Schasinglulu        RCAR_LSI_CUT:=10
28*91f16700Schasinglulu      else ifeq (${LSI_CUT},30)
29*91f16700Schasinglulu        RCAR_LSI_CUT:=20
30*91f16700Schasinglulu      else
31*91f16700Schasinglulu        $(error "Error: ${LSI_CUT} is not supported.")
32*91f16700Schasinglulu      endif
33*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT))
34*91f16700Schasinglulu    endif
35*91f16700Schasinglulu  else ifeq (${LSI},H3N)
36*91f16700Schasinglulu    RCAR_LSI:=${RCAR_H3N}
37*91f16700Schasinglulu    ifndef LSI_CUT
38*91f16700Schasinglulu      # enable compatible function.
39*91f16700Schasinglulu      RCAR_LSI_CUT_COMPAT := 1
40*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT_COMPAT))
41*91f16700Schasinglulu    else
42*91f16700Schasinglulu      # disable compatible function.
43*91f16700Schasinglulu      ifeq (${LSI_CUT},30)
44*91f16700Schasinglulu        RCAR_LSI_CUT:=20
45*91f16700Schasinglulu      else
46*91f16700Schasinglulu        $(error "Error: ${LSI_CUT} is not supported.")
47*91f16700Schasinglulu      endif
48*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT))
49*91f16700Schasinglulu    endif
50*91f16700Schasinglulu  else ifeq (${LSI},M3)
51*91f16700Schasinglulu    RCAR_LSI:=${RCAR_M3}
52*91f16700Schasinglulu    ifndef LSI_CUT
53*91f16700Schasinglulu      # enable compatible function.
54*91f16700Schasinglulu      RCAR_LSI_CUT_COMPAT := 1
55*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT_COMPAT))
56*91f16700Schasinglulu    else
57*91f16700Schasinglulu      # disable compatible function.
58*91f16700Schasinglulu      ifeq (${LSI_CUT},10)
59*91f16700Schasinglulu        RCAR_LSI_CUT:=0
60*91f16700Schasinglulu      else ifeq (${LSI_CUT},11)
61*91f16700Schasinglulu        RCAR_LSI_CUT:=1
62*91f16700Schasinglulu      else ifeq (${LSI_CUT},13)
63*91f16700Schasinglulu        RCAR_LSI_CUT:=3
64*91f16700Schasinglulu      else ifeq (${LSI_CUT},30)
65*91f16700Schasinglulu        RCAR_LSI_CUT:=20
66*91f16700Schasinglulu      else
67*91f16700Schasinglulu        $(error "Error: ${LSI_CUT} is not supported.")
68*91f16700Schasinglulu      endif
69*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT))
70*91f16700Schasinglulu    endif
71*91f16700Schasinglulu  else ifeq (${LSI},M3N)
72*91f16700Schasinglulu    RCAR_LSI:=${RCAR_M3N}
73*91f16700Schasinglulu    ifndef LSI_CUT
74*91f16700Schasinglulu      # enable compatible function.
75*91f16700Schasinglulu      RCAR_LSI_CUT_COMPAT := 1
76*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT_COMPAT))
77*91f16700Schasinglulu    else
78*91f16700Schasinglulu      # disable compatible function.
79*91f16700Schasinglulu      ifeq (${LSI_CUT},10)
80*91f16700Schasinglulu        RCAR_LSI_CUT:=0
81*91f16700Schasinglulu      else ifeq (${LSI_CUT},11)
82*91f16700Schasinglulu        RCAR_LSI_CUT:=1
83*91f16700Schasinglulu      else
84*91f16700Schasinglulu        $(error "Error: ${LSI_CUT} is not supported.")
85*91f16700Schasinglulu      endif
86*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT))
87*91f16700Schasinglulu    endif
88*91f16700Schasinglulu  else ifeq (${LSI},E3)
89*91f16700Schasinglulu    RCAR_LSI:=${RCAR_E3}
90*91f16700Schasinglulu    ifndef LSI_CUT
91*91f16700Schasinglulu      # enable compatible function.
92*91f16700Schasinglulu      RCAR_LSI_CUT_COMPAT := 1
93*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT_COMPAT))
94*91f16700Schasinglulu    else
95*91f16700Schasinglulu      # disable compatible function.
96*91f16700Schasinglulu      ifeq (${LSI_CUT},10)
97*91f16700Schasinglulu        RCAR_LSI_CUT:=0
98*91f16700Schasinglulu      else ifeq (${LSI_CUT},11)
99*91f16700Schasinglulu        RCAR_LSI_CUT:=1
100*91f16700Schasinglulu      else
101*91f16700Schasinglulu        $(error "Error: ${LSI_CUT} is not supported.")
102*91f16700Schasinglulu      endif
103*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT))
104*91f16700Schasinglulu    endif
105*91f16700Schasinglulu  else ifeq (${LSI},D3)
106*91f16700Schasinglulu    RCAR_LSI:=${RCAR_D3}
107*91f16700Schasinglulu    ifndef LSI_CUT
108*91f16700Schasinglulu      # enable compatible function.
109*91f16700Schasinglulu      RCAR_LSI_CUT_COMPAT := 1
110*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT_COMPAT))
111*91f16700Schasinglulu    else
112*91f16700Schasinglulu      # disable compatible function.
113*91f16700Schasinglulu      ifeq (${LSI_CUT},10)
114*91f16700Schasinglulu        RCAR_LSI_CUT:=0
115*91f16700Schasinglulu      else
116*91f16700Schasinglulu        $(error "Error: ${LSI_CUT} is not supported.")
117*91f16700Schasinglulu      endif
118*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT))
119*91f16700Schasinglulu    endif
120*91f16700Schasinglulu  else ifeq (${LSI},V3M)
121*91f16700Schasinglulu    RCAR_LSI:=${RCAR_V3M}
122*91f16700Schasinglulu    ifndef LSI_CUT
123*91f16700Schasinglulu      # enable compatible function.
124*91f16700Schasinglulu      RCAR_LSI_CUT_COMPAT := 1
125*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT_COMPAT))
126*91f16700Schasinglulu    else
127*91f16700Schasinglulu      # disable compatible function.
128*91f16700Schasinglulu      ifeq (${LSI_CUT},10)
129*91f16700Schasinglulu        RCAR_LSI_CUT:=0
130*91f16700Schasinglulu      endif
131*91f16700Schasinglulu      ifeq (${LSI_CUT},20)
132*91f16700Schasinglulu        RCAR_LSI_CUT:=10
133*91f16700Schasinglulu      endif
134*91f16700Schasinglulu      $(eval $(call add_define,RCAR_LSI_CUT))
135*91f16700Schasinglulu    endif
136*91f16700Schasinglulu  else
137*91f16700Schasinglulu    $(error "Error: ${LSI} is not supported.")
138*91f16700Schasinglulu  endif
139*91f16700Schasinglulu  $(eval $(call add_define,RCAR_LSI))
140*91f16700Schasingluluendif
141*91f16700Schasinglulu
142*91f16700Schasinglulu# lock RPC HYPERFLASH access by default
143*91f16700Schasinglulu# unlock to repogram the ATF firmware from u-boot
144*91f16700Schasingluluifndef RCAR_RPC_HYPERFLASH_LOCKED
145*91f16700SchasingluluRCAR_RPC_HYPERFLASH_LOCKED := 1
146*91f16700Schasingluluendif
147*91f16700Schasinglulu$(eval $(call add_define,RCAR_RPC_HYPERFLASH_LOCKED))
148*91f16700Schasinglulu
149*91f16700Schasinglulu# Process RCAR_SECURE_BOOT flag
150*91f16700Schasingluluifndef RCAR_SECURE_BOOT
151*91f16700SchasingluluRCAR_SECURE_BOOT := 1
152*91f16700Schasingluluendif
153*91f16700Schasinglulu$(eval $(call add_define,RCAR_SECURE_BOOT))
154*91f16700Schasinglulu
155*91f16700Schasinglulu# Process RCAR_QOS_TYPE flag
156*91f16700Schasingluluifndef RCAR_QOS_TYPE
157*91f16700SchasingluluRCAR_QOS_TYPE := 0
158*91f16700Schasingluluendif
159*91f16700Schasinglulu$(eval $(call add_define,RCAR_QOS_TYPE))
160*91f16700Schasinglulu
161*91f16700Schasinglulu# Process RCAR_DRAM_SPLIT flag
162*91f16700Schasingluluifndef RCAR_DRAM_SPLIT
163*91f16700SchasingluluRCAR_DRAM_SPLIT := 0
164*91f16700Schasingluluendif
165*91f16700Schasinglulu$(eval $(call add_define,RCAR_DRAM_SPLIT))
166*91f16700Schasinglulu
167*91f16700Schasinglulu# Process RCAR_BL33_EXECUTION_EL flag
168*91f16700Schasingluluifndef RCAR_BL33_EXECUTION_EL
169*91f16700SchasingluluRCAR_BL33_EXECUTION_EL := 0
170*91f16700Schasingluluendif
171*91f16700Schasinglulu$(eval $(call add_define,RCAR_BL33_EXECUTION_EL))
172*91f16700Schasinglulu
173*91f16700Schasinglulu# Process RCAR_AVS_SETTING_ENABLE flag
174*91f16700Schasingluluifeq (${RCAR_AVS_SETTING_ENABLE},0)
175*91f16700SchasingluluAVS_SETTING_ENABLE := 0
176*91f16700Schasingluluelse
177*91f16700SchasingluluAVS_SETTING_ENABLE := 1
178*91f16700Schasingluluendif
179*91f16700Schasinglulu$(eval $(call add_define,AVS_SETTING_ENABLE))
180*91f16700Schasinglulu
181*91f16700Schasinglulu# Process RCAR_LOSSY_ENABLE flag
182*91f16700Schasingluluifndef RCAR_LOSSY_ENABLE
183*91f16700SchasingluluRCAR_LOSSY_ENABLE := 0
184*91f16700Schasingluluendif
185*91f16700Schasinglulu$(eval $(call add_define,RCAR_LOSSY_ENABLE))
186*91f16700Schasinglulu
187*91f16700Schasinglulu# Process LIFEC_DBSC_PROTECT_ENABLE flag
188*91f16700Schasingluluifndef LIFEC_DBSC_PROTECT_ENABLE
189*91f16700SchasingluluLIFEC_DBSC_PROTECT_ENABLE := 1
190*91f16700Schasingluluendif
191*91f16700Schasinglulu$(eval $(call add_define,LIFEC_DBSC_PROTECT_ENABLE))
192*91f16700Schasinglulu
193*91f16700Schasinglulu# Process PMIC_ROHM_BD9571 flag
194*91f16700Schasingluluifndef PMIC_ROHM_BD9571
195*91f16700SchasingluluPMIC_ROHM_BD9571 := 1
196*91f16700Schasingluluendif
197*91f16700Schasinglulu$(eval $(call add_define,PMIC_ROHM_BD9571))
198*91f16700Schasinglulu
199*91f16700Schasinglulu# Process PMIC_LEVEL_MODE flag
200*91f16700Schasingluluifndef PMIC_LEVEL_MODE
201*91f16700SchasingluluPMIC_LEVEL_MODE := 1
202*91f16700Schasingluluendif
203*91f16700Schasinglulu$(eval $(call add_define,PMIC_LEVEL_MODE))
204*91f16700Schasinglulu
205*91f16700Schasinglulu# Process RCAR_GEN3_ULCB flag
206*91f16700Schasingluluifndef RCAR_GEN3_ULCB
207*91f16700SchasingluluRCAR_GEN3_ULCB := 0
208*91f16700Schasingluluendif
209*91f16700Schasingluluifeq (${RCAR_GEN3_ULCB},1)
210*91f16700Schasinglulu BOARD_DEFAULT := 0x10
211*91f16700Schasinglulu $(eval $(call add_define,BOARD_DEFAULT))
212*91f16700Schasingluluendif
213*91f16700Schasinglulu$(eval $(call add_define,RCAR_GEN3_ULCB))
214*91f16700Schasinglulu
215*91f16700Schasinglulu# Process RCAR_REF_INT flag
216*91f16700Schasingluluifndef RCAR_REF_INT
217*91f16700SchasingluluRCAR_REF_INT :=0
218*91f16700Schasingluluendif
219*91f16700Schasinglulu$(eval $(call add_define,RCAR_REF_INT))
220*91f16700Schasinglulu
221*91f16700Schasinglulu# Process RCAR_REWT_TRAINING flag
222*91f16700Schasingluluifndef RCAR_REWT_TRAINING
223*91f16700SchasingluluRCAR_REWT_TRAINING := 1
224*91f16700Schasingluluendif
225*91f16700Schasinglulu$(eval $(call add_define,RCAR_REWT_TRAINING))
226*91f16700Schasinglulu
227*91f16700Schasinglulu# Process RCAR_SYSTEM_SUSPEND flag
228*91f16700Schasingluluifndef RCAR_SYSTEM_SUSPEND
229*91f16700SchasingluluRCAR_SYSTEM_SUSPEND := 1
230*91f16700Schasingluluendif
231*91f16700Schasinglulu$(eval $(call add_define,RCAR_SYSTEM_SUSPEND))
232*91f16700Schasinglulu
233*91f16700Schasinglulu# SYSTEM_SUSPEND requires power control of PMIC etc.
234*91f16700Schasinglulu# When executing SYSTEM_SUSPEND other than Salvator-X, Salvator-XS and Ebisu,
235*91f16700Schasinglulu# processing equivalent to that implemented in PMIC_ROHM_BD9571 is necessary.
236*91f16700Schasingluluifeq (${RCAR_SYSTEM_SUSPEND},1)
237*91f16700Schasinglulu  ifeq (${PMIC_ROHM_BD9571},0)
238*91f16700Schasinglulu    $(error "Error: When you want RCAR_SYSTEM_SUSPEND to be enable, please also set PMIC_ROHM_BD9571 to enable.")
239*91f16700Schasinglulu  endif
240*91f16700Schasingluluendif
241*91f16700Schasinglulu
242*91f16700Schasinglulu# Process RCAR_DRAM_LPDDR4_MEMCONF flag
243*91f16700Schasingluluifndef RCAR_DRAM_LPDDR4_MEMCONF
244*91f16700SchasingluluRCAR_DRAM_LPDDR4_MEMCONF :=1
245*91f16700Schasingluluendif
246*91f16700Schasinglulu$(eval $(call add_define,RCAR_DRAM_LPDDR4_MEMCONF))
247*91f16700Schasinglulu
248*91f16700Schasinglulu# Process RCAR_DRAM_MEMRANK flag
249*91f16700Schasingluluifndef RCAR_DRAM_MEMRANK
250*91f16700SchasingluluRCAR_DRAM_MEMRANK :=0
251*91f16700Schasingluluendif
252*91f16700Schasinglulu$(eval $(call add_define,RCAR_DRAM_MEMRANK))
253*91f16700Schasinglulu
254*91f16700Schasinglulu# Process RCAR_DRAM_DDR3L_MEMCONF flag
255*91f16700Schasingluluifndef RCAR_DRAM_DDR3L_MEMCONF
256*91f16700SchasingluluRCAR_DRAM_DDR3L_MEMCONF :=1
257*91f16700Schasingluluendif
258*91f16700Schasinglulu$(eval $(call add_define,RCAR_DRAM_DDR3L_MEMCONF))
259*91f16700Schasinglulu
260*91f16700Schasinglulu# Process RCAR_DRAM_DDR3L_MEMDUAL flag
261*91f16700Schasingluluifndef RCAR_DRAM_DDR3L_MEMDUAL
262*91f16700SchasingluluRCAR_DRAM_DDR3L_MEMDUAL :=1
263*91f16700Schasingluluendif
264*91f16700Schasinglulu$(eval $(call add_define,RCAR_DRAM_DDR3L_MEMDUAL))
265*91f16700Schasinglulu
266*91f16700Schasinglulu# Process RCAR_BL33_ARG0 flag
267*91f16700Schasingluluifdef RCAR_BL33_ARG0
268*91f16700Schasinglulu$(eval $(call add_define,RCAR_BL33_ARG0))
269*91f16700Schasingluluendif
270*91f16700Schasinglulu
271*91f16700Schasinglulu#Process RCAR_BL2_DCACHE flag
272*91f16700Schasingluluifndef RCAR_BL2_DCACHE
273*91f16700SchasingluluRCAR_BL2_DCACHE := 0
274*91f16700Schasingluluendif
275*91f16700Schasinglulu$(eval $(call add_define,RCAR_BL2_DCACHE))
276*91f16700Schasinglulu
277*91f16700Schasinglulu# Process RCAR_DRAM_CHANNEL flag
278*91f16700Schasingluluifndef RCAR_DRAM_CHANNEL
279*91f16700SchasingluluRCAR_DRAM_CHANNEL :=15
280*91f16700Schasingluluendif
281*91f16700Schasinglulu$(eval $(call add_define,RCAR_DRAM_CHANNEL))
282*91f16700Schasinglulu
283*91f16700Schasinglulu#Process RCAR_SYSTEM_RESET_KEEPON_DDR flag
284*91f16700Schasingluluifndef RCAR_SYSTEM_RESET_KEEPON_DDR
285*91f16700SchasingluluRCAR_SYSTEM_RESET_KEEPON_DDR := 0
286*91f16700Schasingluluendif
287*91f16700Schasinglulu$(eval $(call add_define,RCAR_SYSTEM_RESET_KEEPON_DDR))
288*91f16700Schasinglulu
289*91f16700Schasingluluifndef RCAR_GEN3_BL33_GZIP
290*91f16700SchasingluluRCAR_GEN3_BL33_GZIP := 0
291*91f16700Schasingluluendif
292*91f16700Schasinglulu$(eval $(call add_define,RCAR_GEN3_BL33_GZIP))
293*91f16700Schasinglulu
294*91f16700Schasinglulu# RCAR_SYSTEM_RESET_KEEPON_DDR requires power control of PMIC etc.
295*91f16700Schasinglulu# When executing SYSTEM_SUSPEND other than Salvator-X, Salvator-XS and Ebisu,
296*91f16700Schasinglulu# processing equivalent to that implemented in PMIC_ROHM_BD9571 is necessary.
297*91f16700Schasinglulu# Also, it is necessary to enable RCAR_SYSTEM_SUSPEND.
298*91f16700Schasingluluifeq (${RCAR_SYSTEM_RESET_KEEPON_DDR},1)
299*91f16700Schasinglulu  ifeq (${PMIC_ROHM_BD9571},0)
300*91f16700Schasinglulu    $(error "Error: When you want RCAR_SYSTEM_RESET_KEEPON_DDR to be enable, please also set PMIC_ROHM_BD9571 to enable.")
301*91f16700Schasinglulu  endif
302*91f16700Schasinglulu  ifeq (${RCAR_SYSTEM_SUSPEND},0)
303*91f16700Schasinglulu    $(error "Error: When you want RCAR_SYSTEM_RESET_KEEPON_DDR to be enable, please also set RCAR_SYSTEM_SUSPEND to enable.")
304*91f16700Schasinglulu  endif
305*91f16700Schasingluluendif
306*91f16700Schasinglulu
307*91f16700Schasingluluinclude drivers/renesas/common/ddr/ddr.mk
308*91f16700Schasingluluinclude drivers/renesas/rcar/qos/qos.mk
309*91f16700Schasingluluinclude drivers/renesas/rcar/pfc/pfc.mk
310*91f16700Schasingluluinclude lib/libfdt/libfdt.mk
311*91f16700Schasinglulu
312*91f16700SchasingluluPLAT_INCLUDES	+=	-Idrivers/renesas/common/ddr		\
313*91f16700Schasinglulu			-Idrivers/renesas/rcar/qos		\
314*91f16700Schasinglulu			-Idrivers/renesas/rcar/board		\
315*91f16700Schasinglulu			-Idrivers/renesas/rcar/cpld/		\
316*91f16700Schasinglulu			-Idrivers/renesas/common		\
317*91f16700Schasinglulu			-Idrivers/renesas/common/iic_dvfs	\
318*91f16700Schasinglulu			-Idrivers/renesas/common/avs		\
319*91f16700Schasinglulu			-Idrivers/renesas/common/delay		\
320*91f16700Schasinglulu			-Idrivers/renesas/common/rom		\
321*91f16700Schasinglulu			-Idrivers/renesas/common/scif		\
322*91f16700Schasinglulu			-Idrivers/renesas/common/emmc		\
323*91f16700Schasinglulu			-Idrivers/renesas/common/pwrc		\
324*91f16700Schasinglulu			-Idrivers/renesas/common/io
325*91f16700Schasinglulu
326*91f16700SchasingluluBL2_SOURCES	+=	plat/renesas/rcar/bl2_plat_setup.c	\
327*91f16700Schasinglulu			drivers/renesas/rcar/board/board.c
328*91f16700Schasinglulu
329*91f16700Schasingluluifeq (${RCAR_GEN3_BL33_GZIP},1)
330*91f16700Schasingluluinclude lib/zlib/zlib.mk
331*91f16700Schasinglulu
332*91f16700SchasingluluBL2_SOURCES	+=	common/image_decompress.c               \
333*91f16700Schasinglulu			$(ZLIB_SOURCES)
334*91f16700Schasingluluendif
335*91f16700Schasinglulu
336*91f16700Schasingluluifeq (${RCAR_GEN3_ULCB},1)
337*91f16700SchasingluluBL31_SOURCES		+=	drivers/renesas/rcar/cpld/ulcb_cpld.c
338*91f16700Schasingluluendif
339*91f16700Schasinglulu
340*91f16700Schasinglulu# build the layout images for the bootrom and the necessary srecords
341*91f16700Schasinglulurcar: rcar_layout_tool rcar_srecord
342*91f16700Schasingluludistclean realclean clean: clean_layout_tool clean_srecord
343*91f16700Schasinglulu
344*91f16700Schasinglulu# layout images
345*91f16700SchasingluluLAYOUT_TOOLPATH ?= tools/renesas/rcar_layout_create
346*91f16700Schasinglulu
347*91f16700Schasingluluclean_layout_tool:
348*91f16700Schasinglulu	@echo "clean layout tool"
349*91f16700Schasinglulu	${Q}${MAKE} -C ${LAYOUT_TOOLPATH} clean
350*91f16700Schasinglulu
351*91f16700Schasinglulu.PHONY: rcar_layout_tool
352*91f16700Schasinglulurcar_layout_tool:
353*91f16700Schasinglulu	@echo "generating layout srecs"
354*91f16700Schasinglulu	${Q}${MAKE} CPPFLAGS="-D=AARCH64" --no-print-directory -C ${LAYOUT_TOOLPATH}
355*91f16700Schasinglulu
356*91f16700Schasinglulu# srecords
357*91f16700SchasingluluSREC_PATH	= ${BUILD_PLAT}
358*91f16700SchasingluluBL2_ELF_SRC	= ${SREC_PATH}/bl2/bl2.elf
359*91f16700SchasingluluBL31_ELF_SRC	= ${SREC_PATH}/bl31/bl31.elf
360*91f16700Schasinglulu
361*91f16700Schasingluluclean_srecord:
362*91f16700Schasinglulu	@echo "clean bl2 and bl31 srecs"
363*91f16700Schasinglulu	rm -f ${SREC_PATH}/bl2.srec ${SREC_PATH}/bl31.srec
364*91f16700Schasinglulu
365*91f16700Schasinglulu.PHONY: rcar_srecord
366*91f16700Schasinglulurcar_srecord: $(BL2_ELF_SRC) $(BL31_ELF_SRC)
367*91f16700Schasinglulu	@echo "generating srec: ${SREC_PATH}/bl2.srec"
368*91f16700Schasinglulu	$(Q)$(OC) -O srec --srec-forceS3 ${BL2_ELF_SRC}  ${SREC_PATH}/bl2.srec
369*91f16700Schasinglulu	@echo "generating srec: ${SREC_PATH}/bl31.srec"
370*91f16700Schasinglulu	$(Q)$(OC) -O srec --srec-forceS3 ${BL31_ELF_SRC} ${SREC_PATH}/bl31.srec
371*91f16700Schasinglulu
372