Created
February 27, 2014 11:06
-
-
Save csirac2/9248179 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c | |
index bc58078..5093ed5 100644 | |
--- a/drivers/mmc/host/omap_hsmmc.c | |
+++ b/drivers/mmc/host/omap_hsmmc.c | |
@@ -1021,6 +1021,15 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) | |
struct mmc_data *data; | |
int end_cmd = 0, end_trans = 0; | |
+ if (!host->req_in_progress) { | |
+ do { | |
+ OMAP_HSMMC_WRITE(host->base, STAT, status); | |
+ /* Flush posted write */ | |
+ status = OMAP_HSMMC_READ(host->base, STAT); | |
+ } while (status & INT_EN_MASK); | |
+ return; | |
+ } | |
+ | |
data = host->data; | |
dev_vdbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status); | |
@@ -1040,6 +1049,8 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) | |
} | |
} | |
+ OMAP_HSMMC_WRITE(host->base, STAT, status); | |
+ | |
if (end_cmd || ((status & CC_EN) && host->cmd)) | |
omap_hsmmc_cmd_done(host, host->cmd); | |
if ((end_trans || (status & TC_EN)) && host->mrq) | |
@@ -1055,13 +1066,11 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) | |
int status; | |
status = OMAP_HSMMC_READ(host->base, STAT); | |
- while (status & INT_EN_MASK && host->req_in_progress) { | |
+ do { | |
omap_hsmmc_do_irq(host, status); | |
- | |
/* Flush posted write */ | |
- OMAP_HSMMC_WRITE(host->base, STAT, status); | |
status = OMAP_HSMMC_READ(host->base, STAT); | |
- } | |
+ } while (status & INT_EN_MASK); | |
return IRQ_HANDLED; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basically reverts 1f6b9fa40e76fffaaa0b3bd6a0bfdcf1cdc06efa. TODO: examine 613ad0e98c3596cd2524172fae2a795c3fc57e4a