aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/sd.c')
-rw-r--r--drivers/mmc/core/sd.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 92fa9dceca79..222a60928cdb 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -603,6 +603,14 @@ static void mmc_sd_resume(struct mmc_host *host)
603 603
604} 604}
605 605
606static void mmc_sd_power_restore(struct mmc_host *host)
607{
608 host->card->state &= ~MMC_STATE_HIGHSPEED;
609 mmc_claim_host(host);
610 mmc_sd_init_card(host, host->ocr, host->card);
611 mmc_release_host(host);
612}
613
606#ifdef CONFIG_MMC_UNSAFE_RESUME 614#ifdef CONFIG_MMC_UNSAFE_RESUME
607 615
608static const struct mmc_bus_ops mmc_sd_ops = { 616static const struct mmc_bus_ops mmc_sd_ops = {
@@ -610,6 +618,7 @@ static const struct mmc_bus_ops mmc_sd_ops = {
610 .detect = mmc_sd_detect, 618 .detect = mmc_sd_detect,
611 .suspend = mmc_sd_suspend, 619 .suspend = mmc_sd_suspend,
612 .resume = mmc_sd_resume, 620 .resume = mmc_sd_resume,
621 .power_restore = mmc_sd_power_restore,
613}; 622};
614 623
615static void mmc_sd_attach_bus_ops(struct mmc_host *host) 624static void mmc_sd_attach_bus_ops(struct mmc_host *host)
@@ -624,6 +633,7 @@ static const struct mmc_bus_ops mmc_sd_ops = {
624 .detect = mmc_sd_detect, 633 .detect = mmc_sd_detect,
625 .suspend = NULL, 634 .suspend = NULL,
626 .resume = NULL, 635 .resume = NULL,
636 .power_restore = mmc_sd_power_restore,
627}; 637};
628 638
629static const struct mmc_bus_ops mmc_sd_ops_unsafe = { 639static const struct mmc_bus_ops mmc_sd_ops_unsafe = {
@@ -631,6 +641,7 @@ static const struct mmc_bus_ops mmc_sd_ops_unsafe = {
631 .detect = mmc_sd_detect, 641 .detect = mmc_sd_detect,
632 .suspend = mmc_sd_suspend, 642 .suspend = mmc_sd_suspend,
633 .resume = mmc_sd_resume, 643 .resume = mmc_sd_resume,
644 .power_restore = mmc_sd_power_restore,
634}; 645};
635 646
636static void mmc_sd_attach_bus_ops(struct mmc_host *host) 647static void mmc_sd_attach_bus_ops(struct mmc_host *host)