blob: f96e18bb0ae6496184e1fe2c9df2c95f6e112f8c [file] [log] [blame]
tony.xie54973e72017-04-24 16:18:10 +08001#
Julius Werner65d52672019-05-24 20:37:58 -07002# Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
tony.xie54973e72017-04-24 16:18:10 +08003#
dp-armd91aaae2017-05-10 15:16:15 +01004# SPDX-License-Identifier: BSD-3-Clause
tony.xie54973e72017-04-24 16:18:10 +08005#
6
Heiko Stuebner6892dc32021-02-08 15:44:27 +01007include drivers/arm/gic/v2/gicv2.mk
8
tony.xie54973e72017-04-24 16:18:10 +08009RK_PLAT := plat/rockchip
10RK_PLAT_SOC := ${RK_PLAT}/${PLAT}
11RK_PLAT_COMMON := ${RK_PLAT}/common
12
Christoph Müllner05ceda72019-04-24 09:52:54 +020013DISABLE_BIN_GENERATION := 1
14
tony.xie54973e72017-04-24 16:18:10 +080015PLAT_INCLUDES := -Idrivers/arm/gic/common/ \
16 -Idrivers/arm/gic/v2/ \
tony.xie54973e72017-04-24 16:18:10 +080017 -I${RK_PLAT_COMMON}/ \
18 -I${RK_PLAT_COMMON}/include/ \
Heiko Stuebner385476e2019-03-05 13:46:41 +010019 -I${RK_PLAT_COMMON}/aarch64/ \
tony.xie54973e72017-04-24 16:18:10 +080020 -I${RK_PLAT_COMMON}/drivers/pmu/ \
21 -I${RK_PLAT_COMMON}/drivers/parameter/ \
22 -I${RK_PLAT_SOC}/ \
23 -I${RK_PLAT_SOC}/drivers/pmu/ \
24 -I${RK_PLAT_SOC}/drivers/soc/ \
25 -I${RK_PLAT_SOC}/include/
26
Heiko Stuebner6892dc32021-02-08 15:44:27 +010027RK_GIC_SOURCES := ${GICV2_SOURCES} \
tony.xie54973e72017-04-24 16:18:10 +080028 plat/common/plat_gicv2.c \
29 ${RK_PLAT}/common/rockchip_gicv2.c
30
Julius Wernerf1d230c2019-05-30 16:57:15 -070031PLAT_BL_COMMON_SOURCES := common/desc_image_load.c \
32 lib/bl_aux_params/bl_aux_params.c \
Julius Werner65d52672019-05-24 20:37:58 -070033 lib/xlat_tables/aarch64/xlat_tables.c \
Antonio Nino Diaz58230902018-09-24 17:16:20 +010034 lib/xlat_tables/xlat_tables_common.c \
Antonio Nino Diaza64b1522018-10-16 16:39:12 +010035 plat/common/aarch64/crash_console_helpers.S \
Antonio Nino Diaz58230902018-09-24 17:16:20 +010036 plat/common/plat_psci_common.c
tony.xie54973e72017-04-24 16:18:10 +080037
Christoph Müllnerb4660d82020-11-20 22:06:16 +010038ifneq (${ENABLE_STACK_PROTECTOR},0)
39PLAT_BL_COMMON_SOURCES += ${RK_PLAT_COMMON}/rockchip_stack_protector.c
40endif
41
tony.xie54973e72017-04-24 16:18:10 +080042BL31_SOURCES += ${RK_GIC_SOURCES} \
43 drivers/arm/cci/cci.c \
Antonio Nino Diaz58230902018-09-24 17:16:20 +010044 drivers/ti/uart/aarch64/16550_console.S \
tony.xie54973e72017-04-24 16:18:10 +080045 drivers/delay_timer/delay_timer.c \
46 drivers/delay_timer/generic_delay_timer.c \
47 lib/cpus/aarch64/aem_generic.S \
48 lib/cpus/aarch64/cortex_a53.S \
tony.xie54973e72017-04-24 16:18:10 +080049 ${RK_PLAT_COMMON}/aarch64/plat_helpers.S \
Christoph Müllner81bb0d92019-05-01 17:45:10 +020050 ${RK_PLAT_COMMON}/params_setup.c \
tony.xie54973e72017-04-24 16:18:10 +080051 ${RK_PLAT_COMMON}/bl31_plat_setup.c \
Heiko Stuebner385476e2019-03-05 13:46:41 +010052 ${RK_PLAT_COMMON}/aarch64/pmu_sram_cpus_on.S \
tony.xie54973e72017-04-24 16:18:10 +080053 ${RK_PLAT_COMMON}/plat_pm.c \
54 ${RK_PLAT_COMMON}/plat_topology.c \
55 ${RK_PLAT_COMMON}/aarch64/platform_common.c \
56 ${RK_PLAT_SOC}/drivers/pmu/pmu.c \
57 ${RK_PLAT_SOC}/drivers/soc/soc.c
58
Heiko Stuebner384127d2019-12-12 11:55:26 +010059ifdef PLAT_RK_SECURE_DDR_MINILOADER
60BL31_SOURCES += ${RK_PLAT_COMMON}/drivers/parameter/ddr_parameter.c
61endif
62
Julius Wernerc7087782017-06-09 15:22:44 -070063include lib/coreboot/coreboot.mk
Heiko Stuebner6fd5b942019-04-24 20:26:51 +020064include lib/libfdt/libfdt.mk
Julius Wernerc7087782017-06-09 15:22:44 -070065
Simon South00beb5c2019-10-20 15:20:19 -040066# Enable workarounds for selected Cortex-A53 errata
67ERRATA_A53_855873 := 1
Diederik de Haas6a9c7312023-11-27 10:21:37 +010068ERRATA_A53_1530924 := 1
Simon South00beb5c2019-10-20 15:20:19 -040069
tony.xie54973e72017-04-24 16:18:10 +080070$(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT))
71$(eval $(call add_define,PLAT_SKIP_OPTEE_S_EL1_INT_REGISTER))
David Cunadoc5b0c0f2017-10-31 23:19:21 +000072
73# Do not enable SVE
74ENABLE_SVE_FOR_NS := 0
Dimitris Papastamos8e5bd5e2018-01-24 16:41:14 +000075
76WORKAROUND_CVE_2017_5715 := 0