Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270261
b: refs/heads/master
c: c380546
h: refs/heads/master
i:
  270259: d27e582
v: v3
  • Loading branch information
Balaji T K authored and Chris Ball committed Oct 26, 2011
1 parent 294e843 commit eb35cf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6fe47179a07009ee3ee7c8b962966fee420becc8
refs/heads/master: c3805467aad7ce4e31c2b935046843de08cfc026
9 changes: 7 additions & 2 deletions trunk/drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
* need to tell some cards to go back to the idle
* state. We wait 1ms to give cards time to
* respond.
* mmc_go_idle is needed for eMMC that are asleep
*/
mmc_go_idle(host);

Expand Down Expand Up @@ -900,16 +901,20 @@ static void mmc_detect(struct mmc_host *host)
*/
static int mmc_suspend(struct mmc_host *host)
{
int err = 0;

BUG_ON(!host);
BUG_ON(!host->card);

mmc_claim_host(host);
if (!mmc_host_is_spi(host))
if (mmc_card_can_sleep(host))
err = mmc_card_sleep(host);
else if (!mmc_host_is_spi(host))
mmc_deselect_cards(host);
host->card->state &= ~MMC_STATE_HIGHSPEED;
mmc_release_host(host);

return 0;
return err;
}

/*
Expand Down

0 comments on commit eb35cf3

Please sign in to comment.