by znark » Fri Jul 31, 2015 12:35 am
$this->bbcode_second_pass_quote('moonman', 'T')hanks znark, I will move NSA325 to tested devices' list now.
There is one special additional feature I'd like to see in the future NSA325 U-Boot images. Namely, early watchdog suppression via GPIO register poking. Not in the U-Boot code, but in the Kirkwood boot image "header extension" when building and distributing new NSA325 U-Boot images.
At least on my revision of the NSA325 (v2), the watchdog is so aggressive it will reset the board at about 25% into loading the image when using the UART pins and the kwboot utility. This means that an ordinary user - who is probably neither aware of the watchdog nor the intricacies of disabling it - can
never boot the image via the serial port: the process will always fail mid-transfer. Thus, there is no recovery option in case the U-Boot in the NAND flash should become corrupt, and no safe way of testing out new versions without flashing.
So how to remedy this?
The Kirkwood boot image "header extension" (described in
Marvell's "Functional Specifications", section "24.2.4.2 Header Extension Format") allows setting up registers early, right at the beginning of the slow serial transfer, so the watchdog can be disabled before it times out.
It appears it is enough to set up the GPIO pin 14 as an output and turn it on - i.e. set it in the logical "1" state. This will suppress the watchdog on the NSA325 (my v2, at least.)
In practice, you would need to add the following additional register pokes at the end of the existing ones in the current header extension:
Reg: 0xFFD10100 -> Value: 0x00004000 (Set the GPIO pin 14 on)
Reg: 0xFFD10104 -> Value: 0xFFFFBFFF (Configure the GPIO pin 14 as an output)
Or, in the little-endian format of the image file:
Reg: 00 01 D1 FF -> Value: 00 40 00 00
Reg: 04 01 D1 FF -> Value: FF BF FF FF
Additionally, you need to calculate a new checksum at offset 0x1FF. It's just the sum of all bytes in the extended header modulo 256.
P.S. It seems I can't quote your posts - even the latest one - using the "Quote" button on your message. The forum software responds with "This topic is too old to reply, so, it's locked now. Thanks." But the topic is obviously not locked as the "Post Reply" button still works, but does not allow for easy quoting (I had to do it manually.) Is this expected behavior on this forum? Or if not, how to fix it?