On Wed, Sep 20, 2017 at 5:31 PM, Stefan Roese <s...@denx.de> wrote: > 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? >
There are more differences. 2T was the one that stuckout. As you know working backwards from register values to where the code sets them can be tricky with this code. >> 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. > What I meant was u-boot has 1.29 and I have 1.55 from Marvell. The oldest Marvell version I have is 1.34 which helped me find the 2T thing. I'm wondering what differences exist between 1.29 and 1.34. 1.55 also has support for some newer integrated switch+CPU chips so it is a little hard to separate those bits from the A38X code. >> 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. That's a start at least. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot