Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 1 | # |
dp-arm | 230011c | 2017-03-07 11:02:47 +0000 | [diff] [blame] | 2 | # Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 3 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 5 | # |
| 6 | |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 7 | RK_PLAT := plat/rockchip |
| 8 | RK_PLAT_SOC := ${RK_PLAT}/${PLAT} |
| 9 | RK_PLAT_COMMON := ${RK_PLAT}/common |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 10 | |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 11 | PLAT_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 Zheng | 22a9871 | 2017-02-24 14:56:41 +0800 | [diff] [blame] | 18 | -I${RK_PLAT_SOC}/drivers/secure/ \ |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 19 | -I${RK_PLAT_SOC}/drivers/soc/ \ |
| 20 | -I${RK_PLAT_SOC}/drivers/dram/ \ |
| 21 | -I${RK_PLAT_SOC}/include/ \ |
Xing Zheng | 93280b7 | 2016-10-26 21:25:26 +0800 | [diff] [blame] | 22 | -I${RK_PLAT_SOC}/include/shared/ \ |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 23 | |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 24 | RK_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 Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 29 | |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 30 | PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ |
| 31 | lib/xlat_tables/aarch64/xlat_tables.c \ |
Soby Mathew | f6c4108 | 2016-05-03 12:31:18 +0100 | [diff] [blame] | 32 | plat/common/plat_psci_common.c |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 33 | |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 34 | BL31_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 Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 43 | ${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 \ |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 47 | ${RK_PLAT_COMMON}/plat_pm.c \ |
| 48 | ${RK_PLAT_COMMON}/plat_topology.c \ |
| 49 | ${RK_PLAT_COMMON}/aarch64/platform_common.c \ |
| 50 | ${RK_PLAT_COMMON}/rockchip_sip_svc.c \ |
| 51 | ${RK_PLAT_SOC}/plat_sip_calls.c \ |
| 52 | ${RK_PLAT_SOC}/drivers/gpio/rk3399_gpio.c \ |
| 53 | ${RK_PLAT_SOC}/drivers/pmu/pmu.c \ |
| 54 | ${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c \ |
Xing Zheng | 93280b7 | 2016-10-26 21:25:26 +0800 | [diff] [blame] | 55 | ${RK_PLAT_SOC}/drivers/pmu/m0_ctl.c \ |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 56 | ${RK_PLAT_SOC}/drivers/pwm/pwm.c \ |
Xing Zheng | 22a9871 | 2017-02-24 14:56:41 +0800 | [diff] [blame] | 57 | ${RK_PLAT_SOC}/drivers/secure/secure.c \ |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 58 | ${RK_PLAT_SOC}/drivers/soc/soc.c \ |
| 59 | ${RK_PLAT_SOC}/drivers/dram/dfs.c \ |
| 60 | ${RK_PLAT_SOC}/drivers/dram/dram.c \ |
| 61 | ${RK_PLAT_SOC}/drivers/dram/dram_spec_timing.c \ |
| 62 | ${RK_PLAT_SOC}/drivers/dram/suspend.c |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 63 | |
Derek Basehore | b9be54b | 2016-10-20 16:19:22 -0700 | [diff] [blame] | 64 | ENABLE_PLAT_COMPAT := 0 |
Caesar Wang | d90f43e | 2016-10-11 09:36:00 +0800 | [diff] [blame] | 65 | |
| 66 | $(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT)) |
Caesar Wang | b400374 | 2016-10-12 08:10:12 +0800 | [diff] [blame] | 67 | |
| 68 | # M0 source build |
| 69 | PLAT_M0 := ${PLAT}m0 |
Julius Werner | 705aeeb | 2016-10-31 19:18:47 -0700 | [diff] [blame] | 70 | BUILD_M0 := ${BUILD_PLAT}/m0 |
Caesar Wang | b400374 | 2016-10-12 08:10:12 +0800 | [diff] [blame] | 71 | |
Julius Werner | 705aeeb | 2016-10-31 19:18:47 -0700 | [diff] [blame] | 72 | RK3399M0FW=${BUILD_M0}/${PLAT_M0}.bin |
Caesar Wang | b400374 | 2016-10-12 08:10:12 +0800 | [diff] [blame] | 73 | $(eval $(call add_define,RK3399M0FW)) |
| 74 | |
| 75 | # CCACHE_EXTRAFILES is needed because ccache doesn't handle .incbin |
| 76 | export CCACHE_EXTRAFILES |
| 77 | ${BUILD_PLAT}/bl31/pmu_fw.o: CCACHE_EXTRAFILES=$(RK3399M0FW) |
| 78 | ${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c: $(RK3399M0FW) |
| 79 | |
Julius Werner | 705aeeb | 2016-10-31 19:18:47 -0700 | [diff] [blame] | 80 | $(eval $(call MAKE_PREREQ_DIR,${BUILD_M0},)) |
Caesar Wang | b400374 | 2016-10-12 08:10:12 +0800 | [diff] [blame] | 81 | .PHONY: $(RK3399M0FW) |
Julius Werner | 705aeeb | 2016-10-31 19:18:47 -0700 | [diff] [blame] | 82 | $(RK3399M0FW): | ${BUILD_M0} |
| 83 | $(MAKE) -C ${RK_PLAT_SOC}/drivers/m0 BUILD=$(abspath ${BUILD_PLAT}/m0) |