ddr.mk 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #
  2. # Copyright 2021-2022 NXP
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. ifeq ($(PLAT_DDR_PHY), PHY_GEN2)
  7. $(eval $(call add_define, PHY_GEN2))
  8. PLAT_DDR_PHY_DIR := phy-gen2
  9. ifeq (${APPLY_MAX_CDD},yes)
  10. $(eval $(call add_define,NXP_APPLY_MAX_CDD))
  11. endif
  12. ifeq (${ERRATA_DDR_A011396}, 1)
  13. $(eval $(call add_define,ERRATA_DDR_A011396))
  14. endif
  15. ifeq (${ERRATA_DDR_A050450}, 1)
  16. $(eval $(call add_define,ERRATA_DDR_A050450))
  17. endif
  18. ifeq (${ERRATA_DDR_A050958}, 1)
  19. $(eval $(call add_define,ERRATA_DDR_A050958))
  20. endif
  21. endif
  22. ifeq ($(PLAT_DDR_PHY), PHY_GEN1)
  23. PLAT_DDR_PHY_DIR := phy-gen1
  24. ifeq (${ERRATA_DDR_A008511},1)
  25. $(eval $(call add_define,ERRATA_DDR_A008511))
  26. endif
  27. ifeq (${ERRATA_DDR_A009803},1)
  28. $(eval $(call add_define,ERRATA_DDR_A009803))
  29. endif
  30. ifeq (${ERRATA_DDR_A009942},1)
  31. $(eval $(call add_define,ERRATA_DDR_A009942))
  32. endif
  33. ifeq (${ERRATA_DDR_A010165},1)
  34. $(eval $(call add_define,ERRATA_DDR_A010165))
  35. endif
  36. endif
  37. ifeq ($(DDR_BIST), yes)
  38. $(eval $(call add_define, BIST_EN))
  39. endif
  40. ifeq ($(DDR_DEBUG), yes)
  41. $(eval $(call add_define, DDR_DEBUG))
  42. endif
  43. ifeq ($(DDR_PHY_DEBUG), yes)
  44. $(eval $(call add_define, DDR_PHY_DEBUG))
  45. endif
  46. ifeq ($(DEBUG_PHY_IO), yes)
  47. $(eval $(call add_define, DEBUG_PHY_IO))
  48. endif
  49. ifeq ($(DEBUG_WARM_RESET), yes)
  50. $(eval $(call add_define, DEBUG_WARM_RESET))
  51. endif
  52. ifeq ($(DEBUG_DDR_INPUT_CONFIG), yes)
  53. $(eval $(call add_define, DEBUG_DDR_INPUT_CONFIG))
  54. endif
  55. DDR_CNTLR_SOURCES := $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/ddr.c \
  56. $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/ddrc.c \
  57. $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/dimm.c \
  58. $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/regs.c \
  59. $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/utility.c \
  60. $(PLAT_DRIVERS_PATH)/ddr/$(PLAT_DDR_PHY_DIR)/phy.c
  61. PLAT_INCLUDES += -I$(PLAT_DRIVERS_INCLUDE_PATH)/ddr