mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-13 01:41:29 +02:00
Add optional support for using old DDR3 training code from 2017. The code lives in drivers/ddr/marvell/a38x/old/. To prevent symbol clashing with new DDR3 training code, a special header which renames all clashing symbols via macros is included and the symbols are prefixed with 'old_'. If old DDR3 training support is selected for a board, then the SPL initialization code calls a new function board_use_old_ddr3_training() to check whether it should use old DDR3 training code. The default weak implementation returns false, defaulting to new DDR3 training code. Boards that wish to support this need to select the ARMADA_38X_SUPPORT_OLD_DDR3_TRAINING config option and implement the old version of DDR topology provider, ddr3_get_topology_map(). Signed-off-by: Marek Behún <kabel@kernel.org>
30 lines
1.1 KiB
Makefile
30 lines
1.1 KiB
Makefile
#
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_a38x.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_a38x_training.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_debug.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_hws_hw_training.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_init.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training_bist.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training_centralization.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training_db.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training_hw_algo.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training_ip_engine.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training_leveling.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training_pbs.o
|
|
obj-$(CONFIG_SPL_BUILD) += ddr3_training_static.o
|
|
|
|
define IncludeSymbolRename
|
|
CFLAGS_$(1) = -include $(srctree)/drivers/ddr/marvell/a38x/old/glue_symbol_renames.h
|
|
endef
|
|
|
|
$(foreach obj,$(obj-y),$(eval $(call IncludeSymbolRename,$(obj))))
|
|
|
|
# The old version of DDR training fails weirdly on some boards if the whole
|
|
# driver is compiled with LTO. It seems to work if at least ddr3_init.c is
|
|
# compiled without LTO.
|
|
CFLAGS_REMOVE_ddr3_init.o := $(LTO_CFLAGS)
|