write_firmware: Work around tegrarcm bug with cold_reset
There's a weird bug with tegrarcm or the miniloader included with it on
our Nyan boards: when you enter recovery mode via cold_reset (instead of
warm_reset), the first invocation will fail at the "retrieving platform
info" stage. Just running it again (without another reset) seems to then
make it work. This patch works around that problem by identifying the
error and retrying tegrarcm. While we normally warm_reset anyway, this
is still important for people trying to flash without Servo, since
there's only a cold_reset button on the mainboard.
TEST=Make sure Nyan can be flashed without a Servo on the first try.
Signed-off-by: Julius Werner <email@example.com>
Reviewed-by: Simon Glass <firstname.lastname@example.org>
1 file changed