As per MMC spec, once power has been applied to an SD card, the card can take as much as 250ms to complete its power-up cycle, and become responsive to CMD0. When this delay was not in place, activating the SD card in the env init failed sometimes. With it, no more failure are observed. Signed-off-by: Robert Jarzmik <robert.jarzmik@xxxxxxx> --- drivers/mci/pxamci.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mci/pxamci.c b/drivers/mci/pxamci.c index 9665196..027fa7b 100644 --- a/drivers/mci/pxamci.c +++ b/drivers/mci/pxamci.c @@ -42,6 +42,7 @@ static int pxamci_set_power(struct pxamci_host *host, int on) !!on ^ host->pdata->gpio_power_invert); else if (host->pdata && host->pdata->setpower) host->pdata->setpower(&host->mci, on); + mdelay(250); return 0; } -- 1.7.5.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox