diff options
author | Matthieu CASTET <matthieu.castet@parrot.com> | 2014-08-14 10:03:17 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-09-09 07:59:02 -0400 |
commit | c5abd5e8998e20c2e82999670a03f26f1437d744 (patch) | |
tree | 6db288f9ea42eb23996e791956088efaa723d55c /drivers/mmc/host/sdhci.c | |
parent | 6f67cc6fd1cf339a0f19b9d4a998ec3c0123b1b6 (diff) |
sdhci : handle busy timeout irq
When we wait for busy after sending a command, if there is
a timeout, we got SDHCI_INT_DATA_TIMEOUT flags.
Before this commit we got the message :
"Got data interrupt 0x00100000 even though no data operation was in progress."
and we need to wait 10s that sdhci_timeout_timer expires.
Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index d25deff305a5..bcad1084cc74 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -2304,6 +2304,11 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) | |||
2304 | * above in sdhci_cmd_irq(). | 2304 | * above in sdhci_cmd_irq(). |
2305 | */ | 2305 | */ |
2306 | if (host->cmd && (host->cmd->flags & MMC_RSP_BUSY)) { | 2306 | if (host->cmd && (host->cmd->flags & MMC_RSP_BUSY)) { |
2307 | if (intmask & SDHCI_INT_DATA_TIMEOUT) { | ||
2308 | host->cmd->error = -ETIMEDOUT; | ||
2309 | tasklet_schedule(&host->finish_tasklet); | ||
2310 | return; | ||
2311 | } | ||
2307 | if (intmask & SDHCI_INT_DATA_END) { | 2312 | if (intmask & SDHCI_INT_DATA_END) { |
2308 | sdhci_finish_command(host); | 2313 | sdhci_finish_command(host); |
2309 | return; | 2314 | return; |