diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2018-11-21 09:19:49 +0800 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@linaro.org> | 2018-11-26 09:20:23 +0800 |
commit | 93768644799a71e391c3676abe6508107df9f997 (patch) | |
tree | cc5dd69148dcab38c8934e155b306d708c6a1f3b /drivers | |
parent | 98aab97484b27e40aa74a93e5d1c1ac037a7e0b8 (diff) | |
download | trusted-firmware-a-93768644799a71e391c3676abe6508107df9f997.tar.gz |
mmc: poll eMMC status after EXT_CSD command
EXT_CSD command needs to access data from eMMC device. Add the
operation of polling eMMC device status. Make sure the command is
finished.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/mmc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 418ab1127a..02bf770e55 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -246,6 +246,13 @@ static int mmc_fill_device_info(void) return ret; } + do { + ret = mmc_device_state(); + if (ret < 0) { + return ret; + } + } while (ret != MMC_STATE_TRAN); + nb_blocks = (mmc_ext_csd[CMD_EXTCSD_SEC_CNT] << 0) | (mmc_ext_csd[CMD_EXTCSD_SEC_CNT + 1] << 8) | (mmc_ext_csd[CMD_EXTCSD_SEC_CNT + 2] << 16) | |