mmc: add init_retry

Use the init_retry when mmc error occur.

Change-Id: I5db56d59d4c1f2ed2744d800f475da228cfcaf69
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
Jason Zhu 2018-08-27 09:42:34 +08:00 committed by Kever Yang
parent 6ba4112660
commit e860ec3258
2 changed files with 2 additions and 0 deletions

View File

@ -284,6 +284,7 @@ static int rockchip_dwmmc_probe(struct udevice *dev)
plat->cfg.host_caps |= MMC_MODE_HS200;
plat->mmc.default_phase =
dev_read_u32_default(dev, "default-sample-phase", 0);
plat->mmc.init_retry = 0;
host->mmc = &plat->mmc;
host->mmc->priv = &priv->host;
host->mmc->dev = dev;

View File

@ -567,6 +567,7 @@ struct mmc {
uint erase_grp_size; /* in 512-byte sectors */
uint hc_wp_grp_size; /* in 512-byte sectors */
int default_phase; /* set the default sample clock phase */
uint init_retry; /* re-init mmc when error occur */
struct sd_ssr ssr; /* SD status register */
struct emmc_esr esr; /* emmc status register */
u64 capacity;