MMC core code add 'MMC_CAP_RUNTIME_RESUME', postpone the real card
resume operation from bus_resume to bus_runtime_resume. So after
system resume, for non-removable-card, it still not really resume.
At this point, if user cat the ios or clock node, only get zero
data although the mmc/sd card is still present.
This patch add mmc_get_card() to make sure card really resume back
when user cat ios or clock debugfs file node, then user can get the
correct information.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
struct mmc_ios *ios = &host->ios;
const char *str;
+ if (host->card)
+ mmc_get_card(host->card);
+
seq_printf(s, "clock:\t\t%u Hz\n", ios->clock);
if (host->actual_clock)
seq_printf(s, "actual clock:\t%u Hz\n", host->actual_clock);
}
seq_printf(s, "driver type:\t%u (%s)\n", ios->drv_type, str);
+ if (host->card)
+ mmc_put_card(host->card);
+
return 0;
}
{
struct mmc_host *host = data;
+ if (host->card)
+ mmc_get_card(host->card);
*val = host->ios.clock;
+ if (host->card)
+ mmc_put_card(host->card);
return 0;
}