The patch titled mmc: fix sdhci reset timeout has been added to the -mm tree. Its filename is mmc-fix-sdhci-reset-timeout.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: mmc: fix sdhci reset timeout From: Pierre Ossman <drzeus@xxxxxxxxx> The reset register is automatically cleared when the reset has completed. Hence, we should busy wait and not have a fixed delay. Signed-off-by: Pierre Ossman <drzeus@xxxxxxxxx> Cc: Russell King <rmk@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/mmc/sdhci.c | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff -puN drivers/mmc/sdhci.c~mmc-fix-sdhci-reset-timeout drivers/mmc/sdhci.c --- 25/drivers/mmc/sdhci.c~mmc-fix-sdhci-reset-timeout Tue Jun 27 14:28:29 2006 +++ 25-akpm/drivers/mmc/sdhci.c Tue Jun 27 14:28:29 2006 @@ -94,12 +94,27 @@ static void sdhci_dumpregs(struct sdhci_ 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); } } @@ -619,9 +634,7 @@ static void sdhci_set_ios(struct mmc_hos */ 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); _ Patches currently in -mm which might be from drzeus@xxxxxxxxx are mmc-check-sdhci-base-clock.patch mmc-print-device-id.patch mmc-support-for-multiple-voltages.patch mmc-fix-timeout-loops-in-sdhci.patch mmc-fix-sdhci-reset-timeout.patch mmc-proper-timeout-handling.patch mmc-correct-register-order.patch mmc-fix-interrupt-handling.patch mmc-fix-sdhci-pio-routines.patch mmc-avoid-sdhci-dma-boundaries.patch mmc-test-for-invalid-block-size.patch mmc-check-only-relevant-inhibit-bits.patch mmc-check-controller-version.patch mmc-reset-sdhci-controller-early.patch mmc-more-dma-capabilities-tests.patch mmc-support-controller-specific-quirks.patch mmc-version-bump-sdhci.patch mmc-add-sdhci-controller-ids.patch mmc-quirk-for-broken-reset.patch mmc-force-dma-on-some-controllers.patch mmc-remove-duplicate-error-message.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html