From: Yangbo Lu Date: Tue, 2 Aug 2016 07:33:18 +0000 (+0800) Subject: mmc: send CMD0 before CMD1 for some MMC cards X-Git-Tag: v2016.09-rc2~33 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d188b1130226d304fb3cd2c901b968eca927f39f;p=oweals%2Fu-boot.git mmc: send CMD0 before CMD1 for some MMC cards When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards. This has been verified on Micron MTFC4GACAECN eMMC chip. Signed-off-by: Yangbo Lu --- diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 3daa748822..43ea0bba76 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -422,6 +422,9 @@ static int mmc_complete_op_cond(struct mmc *mmc) mmc->op_cond_pending = 0; if (!(mmc->ocr & OCR_BUSY)) { + /* Some cards seem to need this */ + mmc_go_idle(mmc); + start = get_timer(0); while (1) { err = mmc_send_op_cond_iter(mmc, 1);