=====
CMD52 is a reset for SDIO cards. CMD0 is not sufficient when
the card is being re-initialized. Only send CMD52 if
a) doing a reinitialize
b) card is SDIO or SDIO_COMBO
Signed-off-by: Philip Rakity <prakity@marvell.com>
---
drivers/mmc/core/core.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
@@ -1521,7 +1521,12 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
mmc_hostname(host), __func__, host->f_init);
#endif
mmc_power_up(host);
- sdio_reset(host);
+
+ /* reset sdio before CMD0 when card is being reinitialized */
+ if (host->card &&
+ (host->card->type == MMC_TYPE_SDIO ||
+ host->card->type == MMC_TYPE_SD_COMBO))
+ sdio_reset(host);
mmc_go_idle(host);
mmc_hwungate_clock(host);