summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-02-19 11:56:14 -0500
committerTom Rini <trini@konsulko.com>2021-02-19 11:56:14 -0500
commita1a652e8016426e2d67148cab225cd5ec45189fb (patch)
treebe761ff6a8b75f866ea2ff21195d843becfacbc7 /drivers/mmc/mmc.c
parent766927a7595a6f18fef460a06fdac370fd9e02cf (diff)
parent144d0574d5f3652008ef400e86cc66db5ef88736 (diff)
Merge tag 'mmc-2021-2-19' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
- mmc_spi improvement - added mmc-pwrseq to remove duplicated code - fix response timeout after switch command - sdhci: skip cache invalidation if DMA is not used
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r--drivers/mmc/mmc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 36aab50f64e..b4c8e7f293b 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -841,7 +841,8 @@ static int __mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value,
value);
return -EIO;
}
- if (!ret && (status & MMC_STATUS_RDY_FOR_DATA))
+ if (!ret && (status & MMC_STATUS_RDY_FOR_DATA) &&
+ (status & MMC_STATUS_CURR_STATE) == MMC_STATE_TRANS)
return 0;
udelay(100);
} while (get_timer(start) < timeout_ms);
@@ -2062,7 +2063,7 @@ static int mmc_select_hs400es(struct mmc *mmc)
static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
{
- int err;
+ int err = 0;
const struct mode_width_tuning *mwt;
const struct ext_csd_bus_width *ecbw;