Pankaj Gupta | c518de4 | 2020-12-09 14:02:39 +0530 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2021 NXP |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | DDR_DRIVERS_PATH := ${PLAT_DRIVERS_PATH}/ddr |
| 8 | |
| 9 | ifeq ($(PLAT_DDR_PHY), PHY_GEN2) |
| 10 | $(eval $(call add_define, PHY_GEN2)) |
| 11 | PLAT_DDR_PHY_DIR := phy-gen2 |
| 12 | ifeq (${APPLY_MAX_CDD},yes) |
| 13 | $(eval $(call add_define,NXP_APPLY_MAX_CDD)) |
| 14 | endif |
| 15 | |
| 16 | ifeq (${ERRATA_DDR_A011396}, 1) |
| 17 | $(eval $(call add_define,ERRATA_DDR_A011396)) |
| 18 | endif |
| 19 | |
| 20 | ifeq (${ERRATA_DDR_A050450}, 1) |
| 21 | $(eval $(call add_define,ERRATA_DDR_A050450)) |
| 22 | endif |
| 23 | |
| 24 | endif |
| 25 | |
| 26 | ifeq ($(PLAT_DDR_PHY), PHY_GEN1) |
| 27 | PLAT_DDR_PHY_DIR := phy-gen1 |
| 28 | |
| 29 | ifeq (${ERRATA_DDR_A008511},1) |
| 30 | $(eval $(call add_define,ERRATA_DDR_A008511)) |
| 31 | endif |
| 32 | |
| 33 | ifeq (${ERRATA_DDR_A009803},1) |
| 34 | $(eval $(call add_define,ERRATA_DDR_A009803)) |
| 35 | endif |
| 36 | |
| 37 | ifeq (${ERRATA_DDR_A009942},1) |
| 38 | $(eval $(call add_define,ERRATA_DDR_A009942)) |
| 39 | endif |
| 40 | |
| 41 | ifeq (${ERRATA_DDR_A010165},1) |
| 42 | $(eval $(call add_define,ERRATA_DDR_A010165)) |
| 43 | endif |
| 44 | |
| 45 | endif |
| 46 | |
| 47 | ifeq ($(DDR_BIST), yes) |
| 48 | $(eval $(call add_define, BIST_EN)) |
| 49 | endif |
| 50 | |
| 51 | ifeq ($(DDR_DEBUG), yes) |
| 52 | $(eval $(call add_define, DDR_DEBUG)) |
| 53 | endif |
| 54 | |
| 55 | ifeq ($(DDR_PHY_DEBUG), yes) |
| 56 | $(eval $(call add_define, DDR_PHY_DEBUG)) |
| 57 | endif |
| 58 | |
| 59 | ifeq ($(DEBUG_PHY_IO), yes) |
| 60 | $(eval $(call add_define, DEBUG_PHY_IO)) |
| 61 | endif |
| 62 | |
| 63 | ifeq ($(DEBUG_WARM_RESET), yes) |
| 64 | $(eval $(call add_define, DEBUG_WARM_RESET)) |
| 65 | endif |
| 66 | |
| 67 | ifeq ($(DEBUG_DDR_INPUT_CONFIG), yes) |
| 68 | $(eval $(call add_define, DEBUG_DDR_INPUT_CONFIG)) |
| 69 | endif |
| 70 | |
| 71 | DDR_CNTLR_SOURCES := $(DDR_DRIVERS_PATH)/nxp-ddr/ddr.c \ |
| 72 | $(DDR_DRIVERS_PATH)/nxp-ddr/ddrc.c \ |
| 73 | $(DDR_DRIVERS_PATH)/nxp-ddr/dimm.c \ |
| 74 | $(DDR_DRIVERS_PATH)/nxp-ddr/regs.c \ |
| 75 | $(DDR_DRIVERS_PATH)/nxp-ddr/utility.c \ |
| 76 | $(DDR_DRIVERS_PATH)/$(PLAT_DDR_PHY_DIR)/phy.c |
| 77 | |
| 78 | PLAT_INCLUDES += -I$(DDR_DRIVERS_PATH)/nxp-ddr \ |
| 79 | -I$(DDR_DRIVERS_PATH)/include |