blob: 6bdd947c233b2a1574c666fa2a25d6a30b90d551 [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
Pankaj Guptac518de42020-12-09 14:02:39 +05307ifeq ($(PLAT_DDR_PHY), PHY_GEN2)
8$(eval $(call add_define, PHY_GEN2))
9PLAT_DDR_PHY_DIR := phy-gen2
10ifeq (${APPLY_MAX_CDD},yes)
11$(eval $(call add_define,NXP_APPLY_MAX_CDD))
12endif
13
14ifeq (${ERRATA_DDR_A011396}, 1)
15$(eval $(call add_define,ERRATA_DDR_A011396))
16endif
17
18ifeq (${ERRATA_DDR_A050450}, 1)
19$(eval $(call add_define,ERRATA_DDR_A050450))
20endif
21
22endif
23
24ifeq ($(PLAT_DDR_PHY), PHY_GEN1)
25PLAT_DDR_PHY_DIR := phy-gen1
26
27ifeq (${ERRATA_DDR_A008511},1)
28$(eval $(call add_define,ERRATA_DDR_A008511))
29endif
30
31ifeq (${ERRATA_DDR_A009803},1)
32$(eval $(call add_define,ERRATA_DDR_A009803))
33endif
34
35ifeq (${ERRATA_DDR_A009942},1)
36$(eval $(call add_define,ERRATA_DDR_A009942))
37endif
38
39ifeq (${ERRATA_DDR_A010165},1)
40$(eval $(call add_define,ERRATA_DDR_A010165))
41endif
42
43endif
44
45ifeq ($(DDR_BIST), yes)
46$(eval $(call add_define, BIST_EN))
47endif
48
49ifeq ($(DDR_DEBUG), yes)
50$(eval $(call add_define, DDR_DEBUG))
51endif
52
53ifeq ($(DDR_PHY_DEBUG), yes)
54$(eval $(call add_define, DDR_PHY_DEBUG))
55endif
56
57ifeq ($(DEBUG_PHY_IO), yes)
58$(eval $(call add_define, DEBUG_PHY_IO))
59endif
60
61ifeq ($(DEBUG_WARM_RESET), yes)
62$(eval $(call add_define, DEBUG_WARM_RESET))
63endif
64
65ifeq ($(DEBUG_DDR_INPUT_CONFIG), yes)
66$(eval $(call add_define, DEBUG_DDR_INPUT_CONFIG))
67endif
68
Pankaj Gupta7834b462021-03-25 15:15:52 +053069DDR_CNTLR_SOURCES := $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/ddr.c \
70 $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/ddrc.c \
71 $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/dimm.c \
72 $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/regs.c \
73 $(PLAT_DRIVERS_PATH)/ddr/nxp-ddr/utility.c \
74 $(PLAT_DRIVERS_PATH)/ddr/$(PLAT_DDR_PHY_DIR)/phy.c
Pankaj Guptac518de42020-12-09 14:02:39 +053075
Pankaj Gupta7834b462021-03-25 15:15:52 +053076PLAT_INCLUDES += -I$(PLAT_DRIVERS_INCLUDE_PATH)/ddr