Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297348
b: refs/heads/master
c: 6308d29
h: refs/heads/master
v: v3
  • Loading branch information
Adrian Hunter authored and Chris Ball committed Mar 27, 2012
1 parent 29c49de commit 01edce0
Show file tree
Hide file tree
Showing 3 changed files with 14 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: da721cf7808f9731454757d704f0aa69ae2f1aae
refs/heads/master: 6308d2905bd30290d90f28730828fd572161dd11
13 changes: 11 additions & 2 deletions trunk/drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2426,8 +2426,17 @@ int sdhci_resume_host(struct sdhci_host *host)
if (ret)
return ret;

sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER));
mmiowb();
if ((host->mmc->pm_flags & MMC_PM_KEEP_POWER) &&
(host->quirks2 & SDHCI_QUIRK2_HOST_OFF_CARD_ON)) {
/* Card keeps power but host controller does not */
sdhci_init(host, 0);
host->pwr = 0;
host->clock = 0;
sdhci_do_set_ios(host, &host->mmc->ios);
} else {
sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER));
mmiowb();
}

ret = mmc_resume_host(host->mmc);
sdhci_enable_card_detection(host);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mmc/sdhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ struct sdhci_host {

unsigned int quirks2; /* More deviations from spec. */

#define SDHCI_QUIRK2_HOST_OFF_CARD_ON (1<<0)

int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */

Expand Down

0 comments on commit 01edce0

Please sign in to comment.