Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31649
b: refs/heads/master
c: e16514d
h: refs/heads/master
i:
  31647: 1d012a2
v: v3
  • Loading branch information
Pierre Ossman authored and Russell King committed Jul 2, 2006
1 parent 8aa21d0 commit a5aeacd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 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: 7cb2c76fa2251474e42d55b75163c9d7ed11741e
refs/heads/master: e16514d8d86ecbde18a2a7495cf028861b34c157
21 changes: 17 additions & 4 deletions trunk/drivers/mmc/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,27 @@ static void sdhci_dumpregs(struct sdhci_host *host)

static void sdhci_reset(struct sdhci_host *host, u8 mask)
{
unsigned long timeout;

writeb(mask, host->ioaddr + SDHCI_SOFTWARE_RESET);

if (mask & SDHCI_RESET_ALL) {
if (mask & SDHCI_RESET_ALL)
host->clock = 0;

mdelay(50);
/* Wait max 100 ms */
timeout = 100;

/* hw clears the bit when it's done */
while (readb(host->ioaddr + SDHCI_SOFTWARE_RESET) & mask) {
if (timeout == 0) {
printk(KERN_ERR "%s: Reset 0x%x never completed. "
"Please report this to " BUGMAIL ".\n",
mmc_hostname(host->mmc), (int)mask);
sdhci_dumpregs(host);
return;
}
timeout--;
mdelay(1);
}
}

Expand Down Expand Up @@ -619,9 +634,7 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
*/
if (ios->power_mode == MMC_POWER_OFF) {
writel(0, host->ioaddr + SDHCI_SIGNAL_ENABLE);
spin_unlock_irqrestore(&host->lock, flags);
sdhci_init(host);
spin_lock_irqsave(&host->lock, flags);
}

sdhci_set_clock(host, ios->clock);
Expand Down

0 comments on commit a5aeacd

Please sign in to comment.