diff options
author | Wolfgang Muees <wolfgang.mues@auerswald.de> | 2010-03-05 16:43:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:26:39 -0500 |
commit | a04ac5b9b45a7adec7d3ee3968e677b6e4b98f25 (patch) | |
tree | 3c3b316825b2896fe616c0791e41cc42b6d4a44f /drivers/mmc | |
parent | 0b3520f2df8e4e5dad6a7b2743d037bf06c22024 (diff) |
mmc: at91_mci: fix timeout errors
Fix two timeout errors, one for slow SDHC cards and one for slow users
while inserting SD cards.
Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Andrew Victor <avictor.za@gmail.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/at91_mci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 4e1b2e6288da..37efe6b3f12d 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c | |||
@@ -756,7 +756,8 @@ static void at91_mci_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
756 | host->request = mrq; | 756 | host->request = mrq; |
757 | host->flags = 0; | 757 | host->flags = 0; |
758 | 758 | ||
759 | mod_timer(&host->timer, jiffies + HZ); | 759 | /* more than 1s timeout needed with slow SD cards */ |
760 | mod_timer(&host->timer, jiffies + msecs_to_jiffies(2000)); | ||
760 | 761 | ||
761 | at91_mci_process_next(host); | 762 | at91_mci_process_next(host); |
762 | } | 763 | } |
@@ -944,7 +945,8 @@ static irqreturn_t at91_mmc_det_irq(int irq, void *_host) | |||
944 | pr_debug("****** Resetting SD-card bus width ******\n"); | 945 | pr_debug("****** Resetting SD-card bus width ******\n"); |
945 | at91_mci_write(host, AT91_MCI_SDCR, at91_mci_read(host, AT91_MCI_SDCR) & ~AT91_MCI_SDCBUS); | 946 | at91_mci_write(host, AT91_MCI_SDCR, at91_mci_read(host, AT91_MCI_SDCR) & ~AT91_MCI_SDCBUS); |
946 | } | 947 | } |
947 | mmc_detect_change(host->mmc, msecs_to_jiffies(100)); | 948 | /* 0.5s needed because of early card detect switch firing */ |
949 | mmc_detect_change(host->mmc, msecs_to_jiffies(500)); | ||
948 | } | 950 | } |
949 | return IRQ_HANDLED; | 951 | return IRQ_HANDLED; |
950 | } | 952 | } |