Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186286
b: refs/heads/master
c: 3bca4cf
h: refs/heads/master
v: v3
  • Loading branch information
Chris Ball authored and Linus Torvalds committed Mar 6, 2010
1 parent b256938 commit 4284d2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 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: 2f4cbb3d834922ffa0309b6a08fa42dac87ef9d2
refs/heads/master: 3bca4cf703826fcb2bbabbe19c6fc7b2fc4fd7cc
19 changes: 11 additions & 8 deletions trunk/drivers/mmc/core/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static int sdio_enable_hs(struct mmc_card *card)
* we're trying to reinitialise.
*/
static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
struct mmc_card *oldcard)
struct mmc_card *oldcard, int powered_resume)
{
struct mmc_card *card;
int err;
Expand All @@ -235,9 +235,11 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
/*
* Inform the card of the voltage
*/
err = mmc_send_io_op_cond(host, host->ocr, &ocr);
if (err)
goto err;
if (!powered_resume) {
err = mmc_send_io_op_cond(host, host->ocr, &ocr);
if (err)
goto err;
}

/*
* For SPI, enable CRC as appropriate.
Expand All @@ -262,7 +264,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
/*
* For native busses: set card RCA and quit open drain mode.
*/
if (!mmc_host_is_spi(host)) {
if (!powered_resume && !mmc_host_is_spi(host)) {
err = mmc_send_relative_addr(host, &card->rca);
if (err)
goto remove;
Expand All @@ -273,7 +275,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
/*
* Select card, as all following commands rely on that.
*/
if (!mmc_host_is_spi(host)) {
if (!powered_resume && !mmc_host_is_spi(host)) {
err = mmc_select_card(card);
if (err)
goto remove;
Expand Down Expand Up @@ -437,7 +439,8 @@ static int mmc_sdio_resume(struct mmc_host *host)

/* Basic card reinitialization. */
mmc_claim_host(host);
err = mmc_sdio_init_card(host, host->ocr, host->card);
err = mmc_sdio_init_card(host, host->ocr, host->card,
(host->pm_flags & MMC_PM_KEEP_POWER));
mmc_release_host(host);

/*
Expand Down Expand Up @@ -507,7 +510,7 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
/*
* Detect and init the card.
*/
err = mmc_sdio_init_card(host, host->ocr, NULL);
err = mmc_sdio_init_card(host, host->ocr, NULL, 0);
if (err)
goto err;
card = host->card;
Expand Down

0 comments on commit 4284d2a

Please sign in to comment.