cros_bundle_firmware: Download SPL before releasing power on exynos
A recent EC change breaks USB download:
https://gerrit.chromium.org/gerrit/31291
06b9050 Fix poweron state machine in the EC
The change removes the 1 second grace period after the release of
the power button, before we start checking XPSHOLD.
This creates a race condition, since we need to release the power
button before we send U-Boot (since it might take more than 8 seconds
and we are not supposed to hold the power button down that long).
We seem to be able to win the race by releasing power only after SPL
is downloaded. Make this change.
BUG=chrome-os-partner:12748
BRANCH=snow
TEST=manual
Using A-A cable on snow, run:
$ cros_bundle_firmware -b daisy -d exynos5250-snow -w usb
See that it now succeeds.
Change-Id: I73d76c9549d4e850b00e8c192c0ed16b611a634d
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31952
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
diff --git a/host/lib/write_firmware.py b/host/lib/write_firmware.py
index b0d7aab..66c152c 100644
--- a/host/lib/write_firmware.py
+++ b/host/lib/write_firmware.py
@@ -431,14 +431,13 @@
# The IROM needs roughly 200ms here to be ready for USB download
time.sleep(.5)
+ args = ['-a', '%#x' % item[1], '-f', item[2]]
+ self._tools.Run('smdk-usbdl', args, sudo=True)
if upto == 1:
# Once SPL starts up we can release the power buttom
args = ['fw_up:off', 'pwr_button:release']
self._tools.Run('dut-control', args)
- args = ['-a', '%#x' % item[1], '-f', item[2]]
- self._tools.Run('smdk-usbdl', args, sudo=True)
-
finally:
# Make sure that the power button is released, whatever happens
args = ['fw_up:off', 'pwr_button:release']