HiKeyFastboot: Add short delay after flush to avoid reboot hang

We've frequently seen hangs after flashing partitions on HiKey.
It tends to happen when the flash and reboot commands happen very close
together:
 $ fastboot flash <partition> <image>; fastboot reboot;

Tracing through this, the Flush completes, and then we process
the fastboot reboot command, which issues the PSCI_RESET command
and we seem to hang in PSCI_RESET.

This seems to point to some sort of a hardware issue where the
RESET command may not actually trigger the hardware to reset if
there's some sort of IO still in flight. The flush command
shouldn't return early, but something is not quite right here.

In order to avoid the issue, this patch adds a short delay
after the flush command. With this delay, I can no longer
trigger the reset hang.

Change-Id: I9ccbcdcc597c4546808777c06ecd3f252df15008
Signed-off-by: John Stultz <john.stultz@linaro.org>
2 files changed
tree: c6785b0272ab92e9fd5e0cc4f1d0fcf35cfc6918
  1. Chips/
  2. Drivers/
  3. Include/
  4. Platforms/
  5. Contributions.txt
  6. License.txt
  7. README