Commit 1f6b9fa4 authored by Venkatraman S's avatar Venkatraman S Committed by Chris Ball

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: default avatarVenkatraman S <svenkatr@ti.com>
Acked-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 6c31b215
...@@ -969,15 +969,6 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) ...@@ -969,15 +969,6 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status)
struct mmc_data *data; struct mmc_data *data;
int end_cmd = 0, end_trans = 0; 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; data = host->data;
dev_vdbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status); dev_vdbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status);
...@@ -1028,8 +1019,6 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) ...@@ -1028,8 +1019,6 @@ 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) && host->cmd)) if (end_cmd || ((status & CC) && host->cmd))
omap_hsmmc_cmd_done(host, host->cmd); omap_hsmmc_cmd_done(host, host->cmd);
if ((end_trans || (status & TC)) && host->mrq) if ((end_trans || (status & TC)) && host->mrq)
...@@ -1045,11 +1034,13 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) ...@@ -1045,11 +1034,13 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id)
int status; int status;
status = OMAP_HSMMC_READ(host->base, STAT); status = OMAP_HSMMC_READ(host->base, STAT);
do { while (status & INT_EN_MASK && host->req_in_progress) {
omap_hsmmc_do_irq(host, status); omap_hsmmc_do_irq(host, status);
/* Flush posted write */ /* Flush posted write */
OMAP_HSMMC_WRITE(host->base, STAT, status);
status = OMAP_HSMMC_READ(host->base, STAT); status = OMAP_HSMMC_READ(host->base, STAT);
} while (status & INT_EN_MASK); }
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment