platform.mk 3.1 KB

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