aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2014-05-22 13:53:12 +0530
committerVishal Bhoj <vishal.bhoj@linaro.org>2014-05-22 15:54:53 +0530
commit3fa3bdcfdcb724087762c9dcf6b48e2525bbd6ff (patch)
tree3594b467eb8528ccebe24c31d029a9cadf2ccf37
parent7c1e7c4c398c3d18eaaaf99a4db0892ea3d1ba71 (diff)
Avoid calling MMC_SEND_OP_COND in READY state
There is a probable bug(I am not an mmc expert) in u-boot code calling MMC_SEND_OP_COND in READY state which is forbidden on the models. Forcing the MMC controller to idle state before invoking the MMC_SEND_OP_COND command seems to fix the issue. Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r--drivers/mmc/mmc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 16051e52f..0d7d7522e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1294,8 +1294,11 @@ static int mmc_complete_init(struct mmc *mmc)
{
int err = 0;
- if (mmc->op_cond_pending)
+ if (mmc->op_cond_pending) {
+ /* Some cards seem to need this */
+ mmc_go_idle(mmc);
err = mmc_complete_op_cond(mmc);
+ }
if (!err)
err = mmc_startup(mmc);