soc_common_def.mk 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # Copyright 2020-2022 NXP
  2. #
  3. # SPDX-License-Identifier: BSD-3-Clause
  4. #
  5. # Adding SoC specific defines
  6. ifneq (${CACHE_LINE},)
  7. $(eval $(call add_define_val,PLATFORM_CACHE_LINE_SHIFT,${CACHE_LINE}))
  8. $(eval CACHE_WRITEBACK_GRANULE=$(shell echo $$((1 << $(CACHE_LINE)))))
  9. $(eval $(call add_define_val,CACHE_WRITEBACK_GRANULE,$(CACHE_WRITEBACK_GRANULE)))
  10. endif
  11. ifneq (${INTERCONNECT},)
  12. $(eval $(call add_define,NXP_HAS_${INTERCONNECT}))
  13. ifeq (${INTERCONNECT}, CCI400)
  14. ICNNCT_ID := 0x420
  15. $(eval $(call add_define,ICNNCT_ID))
  16. endif
  17. endif
  18. ifneq (${CHASSIS},)
  19. $(eval $(call add_define,CONFIG_CHASSIS_${CHASSIS}))
  20. endif
  21. ifneq (${PLAT_DDR_PHY},)
  22. $(eval $(call add_define,NXP_DDR_${PLAT_DDR_PHY}))
  23. endif
  24. ifneq (${PHYS_SYS},)
  25. $(eval $(call add_define,CONFIG_PHYS_64BIT))
  26. endif
  27. ifneq (${CSF_HDR_SZ},)
  28. $(eval $(call add_define_val,CSF_HDR_SZ,${CSF_HDR_SZ}))
  29. endif
  30. ifneq (${OCRAM_START_ADDR},)
  31. $(eval $(call add_define_val,NXP_OCRAM_ADDR,${OCRAM_START_ADDR}))
  32. endif
  33. ifneq (${OCRAM_SIZE},)
  34. $(eval $(call add_define_val,NXP_OCRAM_SIZE,${OCRAM_SIZE}))
  35. endif
  36. ifneq (${NXP_ROM_RSVD},)
  37. $(eval $(call add_define_val,NXP_ROM_RSVD,${NXP_ROM_RSVD}))
  38. endif
  39. ifneq (${BL2_BASE},)
  40. $(eval $(call add_define_val,BL2_BASE,${BL2_BASE}))
  41. endif
  42. ifeq (${SEC_MEM_NON_COHERENT},yes)
  43. $(eval $(call add_define,SEC_MEM_NON_COHERENT))
  44. endif
  45. ifneq (${NXP_ESDHC_ENDIANNESS},)
  46. $(eval $(call add_define,NXP_ESDHC_${NXP_ESDHC_ENDIANNESS}))
  47. endif
  48. ifneq (${NXP_SFP_VER},)
  49. $(eval $(call add_define,NXP_SFP_VER_${NXP_SFP_VER}))
  50. endif
  51. ifneq (${NXP_SFP_ENDIANNESS},)
  52. $(eval $(call add_define,NXP_SFP_${NXP_SFP_ENDIANNESS}))
  53. endif
  54. ifneq (${NXP_GPIO_ENDIANNESS},)
  55. $(eval $(call add_define,NXP_GPIO_${NXP_GPIO_ENDIANNESS}))
  56. endif
  57. ifneq (${NXP_SNVS_ENDIANNESS},)
  58. $(eval $(call add_define,NXP_SNVS_${NXP_SNVS_ENDIANNESS}))
  59. endif
  60. ifneq (${NXP_GUR_ENDIANNESS},)
  61. $(eval $(call add_define,NXP_GUR_${NXP_GUR_ENDIANNESS}))
  62. endif
  63. ifneq (${NXP_FSPI_ENDIANNESS},)
  64. $(eval $(call add_define,NXP_FSPI_${NXP_FSPI_ENDIANNESS}))
  65. endif
  66. ifneq (${NXP_SEC_ENDIANNESS},)
  67. $(eval $(call add_define,NXP_SEC_${NXP_SEC_ENDIANNESS}))
  68. endif
  69. ifneq (${NXP_DDR_ENDIANNESS},)
  70. $(eval $(call add_define,NXP_DDR_${NXP_DDR_ENDIANNESS}))
  71. endif
  72. ifneq (${NXP_QSPI_ENDIANNESS},)
  73. $(eval $(call add_define,NXP_QSPI_${NXP_QSPI_ENDIANNESS}))
  74. endif
  75. ifneq (${NXP_SCFG_ENDIANNESS},)
  76. $(eval $(call add_define,NXP_SCFG_${NXP_SCFG_ENDIANNESS}))
  77. endif
  78. ifneq (${NXP_IFC_ENDIANNESS},)
  79. $(eval $(call add_define,NXP_IFC_${NXP_IFC_ENDIANNESS}))
  80. endif
  81. ifneq (${NXP_DDR_INTLV_256B},)
  82. $(eval $(call add_define,NXP_DDR_INTLV_256B))
  83. endif
  84. ifneq (${PLAT_XLAT_TABLES_DYNAMIC},)
  85. $(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
  86. endif
  87. ifeq (${OCRAM_ECC_EN},yes)
  88. $(eval $(call add_define,CONFIG_OCRAM_ECC_EN))
  89. include ${PLAT_COMMON_PATH}/ocram/ocram.mk
  90. endif