diff options
Diffstat (limited to 'drivers/mmc/core/mmc.c')
-rw-r--r-- | drivers/mmc/core/mmc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 5700b1cbdfec..f73fceea5dbd 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -553,6 +553,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, | |||
553 | * need to tell some cards to go back to the idle | 553 | * need to tell some cards to go back to the idle |
554 | * state. We wait 1ms to give cards time to | 554 | * state. We wait 1ms to give cards time to |
555 | * respond. | 555 | * respond. |
556 | * mmc_go_idle is needed for eMMC that are asleep | ||
556 | */ | 557 | */ |
557 | mmc_go_idle(host); | 558 | mmc_go_idle(host); |
558 | 559 | ||
@@ -900,16 +901,20 @@ static void mmc_detect(struct mmc_host *host) | |||
900 | */ | 901 | */ |
901 | static int mmc_suspend(struct mmc_host *host) | 902 | static int mmc_suspend(struct mmc_host *host) |
902 | { | 903 | { |
904 | int err = 0; | ||
905 | |||
903 | BUG_ON(!host); | 906 | BUG_ON(!host); |
904 | BUG_ON(!host->card); | 907 | BUG_ON(!host->card); |
905 | 908 | ||
906 | mmc_claim_host(host); | 909 | mmc_claim_host(host); |
907 | if (!mmc_host_is_spi(host)) | 910 | if (mmc_card_can_sleep(host)) |
911 | err = mmc_card_sleep(host); | ||
912 | else if (!mmc_host_is_spi(host)) | ||
908 | mmc_deselect_cards(host); | 913 | mmc_deselect_cards(host); |
909 | host->card->state &= ~MMC_STATE_HIGHSPEED; | 914 | host->card->state &= ~MMC_STATE_HIGHSPEED; |
910 | mmc_release_host(host); | 915 | mmc_release_host(host); |
911 | 916 | ||
912 | return 0; | 917 | return err; |
913 | } | 918 | } |
914 | 919 | ||
915 | /* | 920 | /* |