[U-Boot] DDR training code for Armada 38x

Stefan Roese sr at denx.de
Wed Sep 20 05:31:43 UTC 2017


Hi Chris,

On 19.09.2017 20:58, Chris Packham wrote:
> When you did the port from Marvell's source did you script any of the
> tidy-up that you did along the way?

Not really. At least not in a reproducible way. I spent long
hours running Lindent, recursive-replace tools and especially
manual code inspection and re-formatting on this huge code.
Still the outcome is far from perfect, but hopefully better
that the original version.

> I'm running up a new board and with the upstream u-boot DDR training
> occasionally fails. But with the Marvell bootloader it doesn't fail.
> The initial port was done from TIP-1.29 but Marvell are now up to
> TIP-1.55 so there is probably some difference that results in my board
> working.
> 
> One difference I've spotted so far is that Marvell enable 2T timing
> mode for all Armada 38x boards (the comment says "resolve low freq
> instability"). But doing that doesn't magically make my board work.

Did you compare all DDR register values (the "good" ones and the "bad"
ones) and only the the 2T timing is different?

> I'm thinking I need to compare TIP-1.29 with TIP-1.55 to look for
> other differences but obviously that's going to be hard given the
> style changes.

Has the style changed in between the Marvell versions as well? I
have not looked into this code for quite some time.

> If you have any scripts (or even just a record of the
> regexes) that you used would you be able to share them?

Please find some scripts attached, I've located that I have used while
doing this porting.

Thanks,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replace-recursive.sh
Type: application/x-sh
Size: 265 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170920/18c3e060/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replace-common-marvell-stuff.sh
Type: application/x-sh
Size: 839 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170920/18c3e060/attachment-0001.sh>


More information about the U-Boot mailing list