Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312844
b: refs/heads/master
c: 473b095
h: refs/heads/master
v: v3
  • Loading branch information
Aaron Lu authored and Chris Ball committed Jul 22, 2012
1 parent aa2ed20 commit b5f5099
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 55fc05b7414274f17795cd0e8a3b1546f3649d5e
refs/heads/master: 473b095a72a95ba719905b1f2e82cd18d099a427
8 changes: 7 additions & 1 deletion trunk/drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <linux/mmc/mmc.h>
#include <linux/mmc/host.h>
#include <linux/mmc/card.h>

#include "sdhci.h"

Expand Down Expand Up @@ -1245,6 +1246,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
struct sdhci_host *host;
bool present;
unsigned long flags;
u32 tuning_opcode;

host = mmc_priv(mmc);

Expand Down Expand Up @@ -1292,8 +1294,12 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
*/
if ((host->flags & SDHCI_NEEDS_RETUNING) &&
!(present_state & (SDHCI_DOING_WRITE | SDHCI_DOING_READ))) {
/* eMMC uses cmd21 while sd and sdio use cmd19 */
tuning_opcode = mmc->card->type == MMC_TYPE_MMC ?
MMC_SEND_TUNING_BLOCK_HS200 :
MMC_SEND_TUNING_BLOCK;
spin_unlock_irqrestore(&host->lock, flags);
sdhci_execute_tuning(mmc, mrq->cmd->opcode);
sdhci_execute_tuning(mmc, tuning_opcode);
spin_lock_irqsave(&host->lock, flags);

/* Restore original mmc_request structure */
Expand Down

0 comments on commit b5f5099

Please sign in to comment.