• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7RK_PLAT		:=	plat/rockchip
8RK_PLAT_SOC	:=	${RK_PLAT}/${PLAT}
9RK_PLAT_COMMON	:=	${RK_PLAT}/common
10
11PLAT_INCLUDES		:=	-I${RK_PLAT_COMMON}/			\
12				-I${RK_PLAT_COMMON}/include/		\
13				-I${RK_PLAT_COMMON}/pmusram		\
14				-I${RK_PLAT_COMMON}/drivers/pmu/	\
15				-I${RK_PLAT_SOC}/			\
16				-I${RK_PLAT_SOC}/drivers/pmu/		\
17				-I${RK_PLAT_SOC}/drivers/pwm/		\
18				-I${RK_PLAT_SOC}/drivers/secure/	\
19				-I${RK_PLAT_SOC}/drivers/soc/		\
20				-I${RK_PLAT_SOC}/drivers/dram/		\
21				-I${RK_PLAT_SOC}/drivers/dp/		\
22				-I${RK_PLAT_SOC}/include/		\
23				-I${RK_PLAT_SOC}/include/shared/	\
24
25RK_GIC_SOURCES		:=	drivers/arm/gic/common/gic_common.c	\
26				drivers/arm/gic/v3/gicv3_main.c		\
27				drivers/arm/gic/v3/gicv3_helpers.c	\
28				plat/common/plat_gicv3.c		\
29				${RK_PLAT}/common/rockchip_gicv3.c
30
31PLAT_BL_COMMON_SOURCES	:=	lib/xlat_tables/xlat_tables_common.c	\
32				lib/xlat_tables/aarch64/xlat_tables.c	\
33				plat/common/plat_psci_common.c
34
35BL31_SOURCES	+=	${RK_GIC_SOURCES}				\
36			drivers/arm/cci/cci.c				\
37			drivers/console/aarch64/console.S		\
38			drivers/ti/uart/aarch64/16550_console.S		\
39			drivers/delay_timer/delay_timer.c		\
40			drivers/delay_timer/generic_delay_timer.c	\
41			drivers/gpio/gpio.c				\
42			lib/cpus/aarch64/cortex_a53.S			\
43			lib/cpus/aarch64/cortex_a72.S			\
44			${RK_PLAT_COMMON}/aarch64/plat_helpers.S	\
45			${RK_PLAT_COMMON}/bl31_plat_setup.c		\
46			${RK_PLAT_COMMON}/params_setup.c		\
47			${RK_PLAT_COMMON}/pmusram/pmu_sram_cpus_on.S	\
48			${RK_PLAT_COMMON}/plat_pm.c			\
49			${RK_PLAT_COMMON}/plat_topology.c		\
50			${RK_PLAT_COMMON}/aarch64/platform_common.c	\
51			${RK_PLAT_COMMON}/rockchip_sip_svc.c		\
52			${RK_PLAT_SOC}/plat_sip_calls.c			\
53			${RK_PLAT_SOC}/drivers/dp/cdn_dp.c		\
54			${RK_PLAT_SOC}/drivers/gpio/rk3399_gpio.c	\
55			${RK_PLAT_SOC}/drivers/pmu/pmu.c		\
56			${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c		\
57			${RK_PLAT_SOC}/drivers/pmu/m0_ctl.c		\
58			${RK_PLAT_SOC}/drivers/pwm/pwm.c		\
59			${RK_PLAT_SOC}/drivers/secure/secure.c		\
60			${RK_PLAT_SOC}/drivers/soc/soc.c		\
61			${RK_PLAT_SOC}/drivers/dram/dfs.c		\
62			${RK_PLAT_SOC}/drivers/dram/dram.c		\
63			${RK_PLAT_SOC}/drivers/dram/dram_spec_timing.c	\
64			${RK_PLAT_SOC}/drivers/dram/suspend.c
65
66ENABLE_PLAT_COMPAT	:=	0
67
68$(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT))
69
70# Enable workarounds for selected Cortex-A53 erratas.
71ERRATA_A53_855873	:=	1
72
73# M0 source build
74PLAT_M0                 :=      ${PLAT}m0
75BUILD_M0		:=	${BUILD_PLAT}/m0
76
77RK3399M0FW=${BUILD_M0}/${PLAT_M0}.bin
78$(eval $(call add_define,RK3399M0FW))
79
80HDCPFW=${RK_PLAT_SOC}/drivers/dp/hdcp.bin
81$(eval $(call add_define,HDCPFW))
82
83# CCACHE_EXTRAFILES is needed because ccache doesn't handle .incbin
84export CCACHE_EXTRAFILES
85${BUILD_PLAT}/bl31/pmu_fw.o: CCACHE_EXTRAFILES=$(RK3399M0FW)
86${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c: $(RK3399M0FW)
87
88${BUILD_PLAT}/bl31/cdn_dp.o: CCACHE_EXTRAFILES=$(HDCPFW)
89${RK_PLAT_SOC}/drivers/dp/cdn_dp.c: $(HDCPFW)
90
91$(eval $(call MAKE_PREREQ_DIR,${BUILD_M0},))
92.PHONY: $(RK3399M0FW)
93$(RK3399M0FW): | ${BUILD_M0}
94	$(MAKE) -C ${RK_PLAT_SOC}/drivers/m0 BUILD=$(abspath ${BUILD_PLAT}/m0)
95