blob: be3e11b9e90de2a356ebeae1f7b9dbe18af8a61c [file] [log] [blame]
Tony Xief6118cc2016-01-15 17:17:32 +08001#
dp-arm230011c2017-03-07 11:02:47 +00002# Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
Tony Xief6118cc2016-01-15 17:17:32 +08003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Tony Xief6118cc2016-01-15 17:17:32 +08005#
6
Derek Basehoreb9be54b2016-10-20 16:19:22 -07007RK_PLAT := plat/rockchip
8RK_PLAT_SOC := ${RK_PLAT}/${PLAT}
9RK_PLAT_COMMON := ${RK_PLAT}/common
Tony Xief6118cc2016-01-15 17:17:32 +080010
Derek Basehoreb9be54b2016-10-20 16:19:22 -070011PLAT_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/ \
Xing Zheng22a98712017-02-24 14:56:41 +080018 -I${RK_PLAT_SOC}/drivers/secure/ \
Derek Basehoreb9be54b2016-10-20 16:19:22 -070019 -I${RK_PLAT_SOC}/drivers/soc/ \
20 -I${RK_PLAT_SOC}/drivers/dram/ \
21 -I${RK_PLAT_SOC}/include/ \
Xing Zheng93280b72016-10-26 21:25:26 +080022 -I${RK_PLAT_SOC}/include/shared/ \
Tony Xief6118cc2016-01-15 17:17:32 +080023
Derek Basehoreb9be54b2016-10-20 16:19:22 -070024RK_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
25 drivers/arm/gic/v3/gicv3_main.c \
26 drivers/arm/gic/v3/gicv3_helpers.c \
27 plat/common/plat_gicv3.c \
28 ${RK_PLAT}/common/rockchip_gicv3.c
Tony Xief6118cc2016-01-15 17:17:32 +080029
Derek Basehoreb9be54b2016-10-20 16:19:22 -070030PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \
31 lib/xlat_tables/aarch64/xlat_tables.c \
Soby Mathewf6c41082016-05-03 12:31:18 +010032 plat/common/plat_psci_common.c
Tony Xief6118cc2016-01-15 17:17:32 +080033
Derek Basehoreb9be54b2016-10-20 16:19:22 -070034BL31_SOURCES += ${RK_GIC_SOURCES} \
35 drivers/arm/cci/cci.c \
36 drivers/console/aarch64/console.S \
37 drivers/ti/uart/aarch64/16550_console.S \
38 drivers/delay_timer/delay_timer.c \
39 drivers/delay_timer/generic_delay_timer.c \
40 drivers/gpio/gpio.c \
41 lib/cpus/aarch64/cortex_a53.S \
42 lib/cpus/aarch64/cortex_a72.S \
Derek Basehoreb9be54b2016-10-20 16:19:22 -070043 ${RK_PLAT_COMMON}/aarch64/plat_helpers.S \
44 ${RK_PLAT_COMMON}/bl31_plat_setup.c \
45 ${RK_PLAT_COMMON}/params_setup.c \
46 ${RK_PLAT_COMMON}/pmusram/pmu_sram_cpus_on.S \
47 ${RK_PLAT_COMMON}/pmusram/pmu_sram.c \
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/gpio/rk3399_gpio.c \
54 ${RK_PLAT_SOC}/drivers/pmu/pmu.c \
55 ${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c \
Xing Zheng93280b72016-10-26 21:25:26 +080056 ${RK_PLAT_SOC}/drivers/pmu/m0_ctl.c \
Derek Basehoreb9be54b2016-10-20 16:19:22 -070057 ${RK_PLAT_SOC}/drivers/pwm/pwm.c \
Xing Zheng22a98712017-02-24 14:56:41 +080058 ${RK_PLAT_SOC}/drivers/secure/secure.c \
Derek Basehoreb9be54b2016-10-20 16:19:22 -070059 ${RK_PLAT_SOC}/drivers/soc/soc.c \
60 ${RK_PLAT_SOC}/drivers/dram/dfs.c \
61 ${RK_PLAT_SOC}/drivers/dram/dram.c \
62 ${RK_PLAT_SOC}/drivers/dram/dram_spec_timing.c \
63 ${RK_PLAT_SOC}/drivers/dram/suspend.c
Tony Xief6118cc2016-01-15 17:17:32 +080064
Derek Basehoreb9be54b2016-10-20 16:19:22 -070065ENABLE_PLAT_COMPAT := 0
Caesar Wangd90f43e2016-10-11 09:36:00 +080066
67$(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT))
Caesar Wangb4003742016-10-12 08:10:12 +080068
69# M0 source build
70PLAT_M0 := ${PLAT}m0
Julius Werner705aeeb2016-10-31 19:18:47 -070071BUILD_M0 := ${BUILD_PLAT}/m0
Caesar Wangb4003742016-10-12 08:10:12 +080072
Julius Werner705aeeb2016-10-31 19:18:47 -070073RK3399M0FW=${BUILD_M0}/${PLAT_M0}.bin
Caesar Wangb4003742016-10-12 08:10:12 +080074$(eval $(call add_define,RK3399M0FW))
75
76# CCACHE_EXTRAFILES is needed because ccache doesn't handle .incbin
77export CCACHE_EXTRAFILES
78${BUILD_PLAT}/bl31/pmu_fw.o: CCACHE_EXTRAFILES=$(RK3399M0FW)
79${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c: $(RK3399M0FW)
80
Julius Werner705aeeb2016-10-31 19:18:47 -070081$(eval $(call MAKE_PREREQ_DIR,${BUILD_M0},))
Caesar Wangb4003742016-10-12 08:10:12 +080082.PHONY: $(RK3399M0FW)
Julius Werner705aeeb2016-10-31 19:18:47 -070083$(RK3399M0FW): | ${BUILD_M0}
84 $(MAKE) -C ${RK_PLAT_SOC}/drivers/m0 BUILD=$(abspath ${BUILD_PLAT}/m0)