mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
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>
This commit is contained in:
parent
98aab97484
commit
9376864479
1 changed files with 7 additions and 0 deletions
|
@ -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) |
|
||||
|
|
Loading…
Add table
Reference in a new issue