XiaoDong Huang | dcf89f3 | 2023-06-26 16:43:30 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2024, Rockchip, Inc. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | RK_PLAT := plat/rockchip |
| 8 | RK_PLAT_SOC := ${RK_PLAT}/${PLAT} |
| 9 | RK_PLAT_COMMON := ${RK_PLAT}/common |
| 10 | |
| 11 | DISABLE_BIN_GENERATION := 1 |
| 12 | include lib/libfdt/libfdt.mk |
| 13 | include lib/xlat_tables_v2/xlat_tables.mk |
| 14 | |
| 15 | # GIC-600 configuration |
| 16 | GICV3_IMPL := GIC600 |
| 17 | GICV3_SUPPORT_GIC600 := 1 |
| 18 | |
| 19 | # Include GICv3 driver files |
| 20 | include drivers/arm/gic/v3/gicv3.mk |
| 21 | |
| 22 | PLAT_INCLUDES := -Iinclude/plat/common \ |
| 23 | -Idrivers/arm/gic/v3/ \ |
XiaoDong Huang | 51c6bf8 | 2023-06-25 17:38:13 +0800 | [diff] [blame] | 24 | -Idrivers/scmi-msg/ \ |
XiaoDong Huang | dcf89f3 | 2023-06-26 16:43:30 +0800 | [diff] [blame] | 25 | -I${RK_PLAT_COMMON}/ \ |
| 26 | -I${RK_PLAT_COMMON}/drivers/pmu/ \ |
| 27 | -I${RK_PLAT_COMMON}/drivers/parameter/ \ |
| 28 | -I${RK_PLAT_COMMON}/include/ \ |
| 29 | -I${RK_PLAT_COMMON}/pmusram/ \ |
XiaoDong Huang | 51c6bf8 | 2023-06-25 17:38:13 +0800 | [diff] [blame] | 30 | -I${RK_PLAT_COMMON}/scmi/ \ |
XiaoDong Huang | dcf89f3 | 2023-06-26 16:43:30 +0800 | [diff] [blame] | 31 | -I${RK_PLAT_SOC}/ \ |
| 32 | -I${RK_PLAT_SOC}/drivers/pmu/ \ |
XiaoDong Huang | 51c6bf8 | 2023-06-25 17:38:13 +0800 | [diff] [blame] | 33 | -I${RK_PLAT_SOC}/drivers/scmi/ \ |
XiaoDong Huang | dcf89f3 | 2023-06-26 16:43:30 +0800 | [diff] [blame] | 34 | -I${RK_PLAT_SOC}/drivers/secure/ \ |
| 35 | -I${RK_PLAT_SOC}/drivers/soc/ \ |
| 36 | -I${RK_PLAT_SOC}/include/ |
| 37 | |
| 38 | RK_GIC_SOURCES := ${GICV3_SOURCES} \ |
| 39 | plat/common/plat_gicv3.c \ |
| 40 | ${RK_PLAT}/common/rockchip_gicv3.c |
| 41 | |
| 42 | PLAT_BL_COMMON_SOURCES := ${XLAT_TABLES_LIB_SRCS} \ |
| 43 | common/desc_image_load.c \ |
| 44 | plat/common/aarch64/crash_console_helpers.S \ |
| 45 | lib/bl_aux_params/bl_aux_params.c \ |
| 46 | plat/common/plat_psci_common.c |
| 47 | |
| 48 | ifneq (${ENABLE_STACK_PROTECTOR},0) |
| 49 | PLAT_BL_COMMON_SOURCES += ${RK_PLAT_COMMON}/rockchip_stack_protector.c |
| 50 | endif |
| 51 | |
| 52 | BL31_SOURCES += ${RK_GIC_SOURCES} \ |
| 53 | drivers/ti/uart/aarch64/16550_console.S \ |
| 54 | drivers/delay_timer/delay_timer.c \ |
| 55 | drivers/delay_timer/generic_delay_timer.c \ |
XiaoDong Huang | 51c6bf8 | 2023-06-25 17:38:13 +0800 | [diff] [blame] | 56 | drivers/scmi-msg/base.c \ |
| 57 | drivers/scmi-msg/clock.c \ |
| 58 | drivers/scmi-msg/entry.c \ |
| 59 | drivers/scmi-msg/reset_domain.c \ |
| 60 | drivers/scmi-msg/smt.c \ |
XiaoDong Huang | dcf89f3 | 2023-06-26 16:43:30 +0800 | [diff] [blame] | 61 | lib/cpus/aarch64/cortex_a55.S \ |
| 62 | lib/cpus/aarch64/cortex_a76.S \ |
| 63 | ${RK_PLAT_COMMON}/aarch64/plat_helpers.S \ |
| 64 | ${RK_PLAT_COMMON}/aarch64/platform_common.c \ |
| 65 | ${RK_PLAT_COMMON}/bl31_plat_setup.c \ |
| 66 | ${RK_PLAT_COMMON}/plat_pm.c \ |
| 67 | ${RK_PLAT_COMMON}/plat_pm_helpers.c \ |
| 68 | ${RK_PLAT_COMMON}/plat_topology.c \ |
| 69 | ${RK_PLAT_COMMON}/params_setup.c \ |
| 70 | ${RK_PLAT_COMMON}/pmusram/cpus_on_fixed_addr.S \ |
| 71 | ${RK_PLAT_COMMON}/rockchip_sip_svc.c \ |
XiaoDong Huang | 51c6bf8 | 2023-06-25 17:38:13 +0800 | [diff] [blame] | 72 | ${RK_PLAT_COMMON}/scmi/scmi.c \ |
| 73 | ${RK_PLAT_COMMON}/scmi/scmi_clock.c \ |
| 74 | ${RK_PLAT_COMMON}/scmi/scmi_rstd.c \ |
XiaoDong Huang | dcf89f3 | 2023-06-26 16:43:30 +0800 | [diff] [blame] | 75 | ${RK_PLAT_SOC}/plat_sip_calls.c \ |
| 76 | ${RK_PLAT_SOC}/drivers/secure/secure.c \ |
| 77 | ${RK_PLAT_SOC}/drivers/soc/soc.c \ |
| 78 | ${RK_PLAT_SOC}/drivers/pmu/pmu.c \ |
XiaoDong Huang | 51c6bf8 | 2023-06-25 17:38:13 +0800 | [diff] [blame] | 79 | ${RK_PLAT_SOC}/drivers/pmu/pm_pd_regs.c \ |
| 80 | ${RK_PLAT_SOC}/drivers/scmi/rk3588_clk.c \ |
| 81 | ${RK_PLAT_SOC}/drivers/scmi/rk3588_rstd.c |
XiaoDong Huang | dcf89f3 | 2023-06-26 16:43:30 +0800 | [diff] [blame] | 82 | |
| 83 | CTX_INCLUDE_AARCH32_REGS := 0 |
| 84 | ENABLE_PLAT_COMPAT := 0 |
| 85 | MULTI_CONSOLE_API := 1 |
| 86 | ERRATA_A55_1530923 := 1 |
| 87 | |
| 88 | # System coherency is managed in hardware |
| 89 | HW_ASSISTED_COHERENCY := 1 |
| 90 | |
| 91 | # When building for systems with hardware-assisted coherency, there's no need to |
| 92 | # use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too. |
| 93 | USE_COHERENT_MEM := 0 |
| 94 | |
| 95 | ENABLE_SPE_FOR_LOWER_ELS := 0 |
| 96 | |
| 97 | $(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT)) |
XiaoDong Huang | 974e3a1 | 2024-06-17 10:55:27 +0800 | [diff] [blame] | 98 | $(eval $(call add_define,PLAT_RK_CPU_RESET_EARLY)) |