aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkatraman S <svenkatr@ti.com>2012-08-08 06:14:29 -0400
committerChris Ball <cjb@laptop.org>2012-09-04 13:58:24 -0400
commit1f6b9fa40e76fffaaa0b3bd6a0bfdcf1cdc06efa (patch)
tree1a5cc1c73e368c14a4b58801143ca972132b8652
parent6c31b2150ff96755d24e0ab6d6fea08a7bf5c44c (diff)
mmc: omap_hsmmc: consolidate flush posted writes for HSMMC IRQs
Flushing spurious IRQs from HSMMC IP is done twice in omap_hsmmc_irq and omap_hsmmc_do_irq. Consolidate them to one location. Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/omap_hsmmc.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 4bc55acc6f36..20453c82d0f2 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -969,15 +969,6 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status)
969 struct mmc_data *data; 969 struct mmc_data *data;
970 int end_cmd = 0, end_trans = 0; 970 int end_cmd = 0, end_trans = 0;
971 971
972 if (!host->req_in_progress) {
973 do {
974 OMAP_HSMMC_WRITE(host->base, STAT, status);
975 /* Flush posted write */
976 status = OMAP_HSMMC_READ(host->base, STAT);
977 } while (status & INT_EN_MASK);
978 return;
979 }
980
981 data = host->data; 972 data = host->data;
982 dev_vdbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status); 973 dev_vdbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status);
983 974
@@ -1028,8 +1019,6 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status)
1028 } 1019 }
1029 } 1020 }
1030 1021
1031 OMAP_HSMMC_WRITE(host->base, STAT, status);
1032
1033 if (end_cmd || ((status & CC) && host->cmd)) 1022 if (end_cmd || ((status & CC) && host->cmd))
1034 omap_hsmmc_cmd_done(host, host->cmd); 1023 omap_hsmmc_cmd_done(host, host->cmd);
1035 if ((end_trans || (status & TC)) && host->mrq) 1024 if ((end_trans || (status & TC)) && host->mrq)
@@ -1045,11 +1034,13 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id)
1045 int status; 1034 int status;
1046 1035
1047 status = OMAP_HSMMC_READ(host->base, STAT); 1036 status = OMAP_HSMMC_READ(host->base, STAT);
1048 do { 1037 while (status & INT_EN_MASK && host->req_in_progress) {
1049 omap_hsmmc_do_irq(host, status); 1038 omap_hsmmc_do_irq(host, status);
1039
1050 /* Flush posted write */ 1040 /* Flush posted write */
1041 OMAP_HSMMC_WRITE(host->base, STAT, status);
1051 status = OMAP_HSMMC_READ(host->base, STAT); 1042 status = OMAP_HSMMC_READ(host->base, STAT);
1052 } while (status & INT_EN_MASK); 1043 }
1053 1044
1054 return IRQ_HANDLED; 1045 return IRQ_HANDLED;
1055} 1046}