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