summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu CASTET <matthieu.castet@parrot.com>2014-08-14 16:03:17 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-10-11 00:08:30 +0200
commit784248a0e50058f380e87bacedf38c8eb48b5af2 (patch)
treee94b373df29932a6d9f66ae47ee904accbf10982
parent3bec89bc10881125c5c50f9d4491df399074f523 (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> (cherry picked from commit c5abd5e8998e20c2e82999670a03f26f1437d744)
-rw-r--r--drivers/mmc/host/sdhci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 836b0451c9e4..59d6b719b0aa 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2211,6 +2211,11 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
* above in sdhci_cmd_irq().
*/
if (host->cmd && (host->cmd->flags & MMC_RSP_BUSY)) {
+ if (intmask & SDHCI_INT_DATA_TIMEOUT) {
+ host->cmd->error = -ETIMEDOUT;
+ tasklet_schedule(&host->finish_tasklet);
+ return;
+ }
if (intmask & SDHCI_INT_DATA_END) {
sdhci_finish_command(host);
return;