]> git.dujemihanovic.xyz Git - u-boot.git/commit
ddr: marvell: a38x: Import old DDR training code from 2017 version of U-Boot
authorMarek Behún <kabel@kernel.org>
Tue, 18 Jun 2024 15:34:35 +0000 (17:34 +0200)
committerStefan Roese <sr@denx.de>
Mon, 8 Jul 2024 06:20:58 +0000 (08:20 +0200)
commitcae6e8993c8eaed7c520b1046766b658e0f97b90
tree55417df27941369a19068050447b7f8b9658956b
parent137057ac16b882725f60d12fc2440fdc8530cb3a
ddr: marvell: a38x: Import old DDR training code from 2017 version of U-Boot

Import DDR training code from commit 1b69ce2fc0ec ("arm: mvebu:
ddr3_debug: remove self assignments") into
drivers/ddr/marvell/a38x/old/. The code is not used yet.

Explanation:

Since 2019, on some Turris Omnia boards we have been having problems
with newer versions of Marvell's DDR3 training code for Armada 38x,
which is ported from mv-ddr-marvell [1] to U-Boot into the
drivers/ddr/marvell/a38x/ directory:
- sometimes the DDR3 training fails on some older boards, sometime it
  fails on some newer boards
- other times it succeeds, but some boards experience crashes of the
  operating system after running for some time.

Using the stock version of Turris Omnia's U-Boot from solved these
issues, but this solution was not satisfactory, since we wanted
features from new U-Boot.

Back in 2020-2022 we have spent several months trying to debug the
issues, working with Marvell, on our own, and also with U-Boot
community, but these issues persist still.

One solution we used back in 2019 was a "hybrid U-Boot": the SPL part
(containing the DDR3 training code) was taken from the stock version,
while the proper part was current U-Boot at the time. This solution also
has its drawbacks, of which the main one is the need to glue binaries
from two separate builds.

Since then there have been some more changes to the DDR3 training code
in upstream mv-ddr-marvell that have been ported to U-Boot. We have
provided our users experimental builds of U-Boot in the TurrisOS so that
they could try upgrading the firmware and let us know if those problems
still exist. And they do.

We do not have the time nor manpower to debug this problem and fix it
properly. Marvell was also no able to provide a solution to this,
probably because they do not have the manpower as well.

I have therefore come up with this "not that pretty" solution: take the
DDR3 training code from an older version of U-Boot that is known to
work, put it into current U-Boot under old/ subdirectory within
drivers/ddr/marvell/a38x/, build into the SPL binary both the old and
new versions and make it possible to select the old version via an env
variable.

[1] https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell

Signed-off-by: Marek Behún <kabel@kernel.org>
41 files changed:
drivers/ddr/marvell/a38x/old/Makefile [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_a38x.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_a38x.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_a38x_mc_static.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_a38x_topology.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_a38x_training.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_debug.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_hws_hw_training.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_hws_hw_training.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_hws_hw_training_def.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_hws_sil_training.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_init.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_init.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_logging_def.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_patterns_64bit.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_topology_def.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_bist.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_centralization.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_db.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_hw_algo.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_hw_algo.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_bist.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_centralization.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_db.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_def.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_engine.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_engine.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_flow.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_pbs.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_prv_if.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_ip_static.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_leveling.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_leveling.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_pbs.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr3_training_static.c [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr_topology_def.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/ddr_training_ip_db.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/silicon_if.h [new file with mode: 0644]
drivers/ddr/marvell/a38x/old/xor.h [new file with mode: 0644]