mmc: retries all failed commands.
authorVincent Palatin <vpalatin@chromium.org>
Wed, 25 May 2016 22:00:49 +0000 (15:00 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 26 May 2016 21:34:38 +0000 (14:34 -0700)
commit422ddb299760d9fcac249a5eb9bb66409eb0cb11
treee8304ecf8ae354fc85e9d0d173cca897a56e63b0
parent75f4768718cf631e8f6caa41801d2afddb2ec078
mmc: retries all failed commands.

Retry a second time all failed MMC commands.

On veyron_tiger, after a warm reset (which is cutting only VCC on the eMMC),
CMD0(GO_IDLE) and CMD1(SEND_OP_COND) are randomly failing the first time.
This workarounds the issue.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=veyron
BUG=chrome-os-partner:53606
TEST=On veyron_tiger, execute a lot of warm_reboot and see the system booting
from eMMC properly every time rather than falling back in recovery mode.
(with and without serial traces enabled in the bootloader)

Change-Id: I87d68bf1ef6dca55ff098e2fb4a72e0719c73798
Reviewed-on: https://chromium-review.googlesource.com/347440
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
src/drivers/storage/mmc.c