Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297343
b: refs/heads/master
c: 52d0974
h: refs/heads/master
i:
  297341: 01c209f
  297339: 488982b
  297335: 8a34c35
  297327: 804be50
  297311: 55be6e1
  297279: d094aef
  297215: b46e23f
v: v3
  • Loading branch information
Subhash Jadavani authored and Chris Ball committed Mar 27, 2012
1 parent a001b7f commit 33b1e8f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 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: 37f6190d54f4d90b886784fadbb9cf82d5c8b1ef
refs/heads/master: 52d0974e36761fd1daf1eb02cfb2444a7b200087
38 changes: 21 additions & 17 deletions trunk/drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1046,22 +1046,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
}
}

/*
* Enable HPI feature (if supported)
*/
if (card->ext_csd.hpi) {
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
EXT_CSD_HPI_MGMT, 1, 0);
if (err && err != -EBADMSG)
goto free_card;
if (err) {
pr_warning("%s: Enabling HPI failed\n",
mmc_hostname(card->host));
err = 0;
} else
card->ext_csd.hpi_en = 1;
}

/*
* Compute bus speed.
*/
Expand Down Expand Up @@ -1111,9 +1095,12 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
* 4. execute tuning for HS200
*/
if ((host->caps2 & MMC_CAP2_HS200) &&
card->host->ops->execute_tuning)
card->host->ops->execute_tuning) {
mmc_host_clk_hold(card->host);
err = card->host->ops->execute_tuning(card->host,
MMC_SEND_TUNING_BLOCK_HS200);
mmc_host_clk_release(card->host);
}
if (err) {
pr_warning("%s: tuning execution failed\n",
mmc_hostname(card->host));
Expand Down Expand Up @@ -1232,6 +1219,23 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
}
}

/*
* Enable HPI feature (if supported)
*/
if (card->ext_csd.hpi) {
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
EXT_CSD_HPI_MGMT, 1,
card->ext_csd.generic_cmd6_time);
if (err && err != -EBADMSG)
goto free_card;
if (err) {
pr_warning("%s: Enabling HPI failed\n",
mmc_hostname(card->host));
err = 0;
} else
card->ext_csd.hpi_en = 1;
}

/*
* If cache size is higher than 0, this indicates
* the existence of cache and it can be turned on.
Expand Down

0 comments on commit 33b1e8f

Please sign in to comment.