Commit 93768644 authored by Haojian Zhuang's avatar Haojian Zhuang
Browse files

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: default avatarHaojian Zhuang <haojian.zhuang@linaro.org>
parent 98aab974
......@@ -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) |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment