summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-03-22 22:33:50 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 21:41:46 +0200
commit1f8066d90739ebfdf70a5debbc5fed22fdd17465 (patch)
treec3819ba004dc5c68aaa929c57759c09407cb1c9b /drivers/mmc
parentmmc: meson-gx: improve variable usage in meson_mmc_start_cmd (diff)
downloadlinux-1f8066d90739ebfdf70a5debbc5fed22fdd17465.tar.xz
linux-1f8066d90739ebfdf70a5debbc5fed22fdd17465.zip
mmc: meson-gx: improve response reading
Response reading can be slightly improved by doing it in just one place. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/meson-gx-mmc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 8bf3eb540eb7..c4ddd8201825 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -562,6 +562,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
goto out;
}
+ meson_mmc_read_resp(host->mmc, cmd);
+
cmd->error = 0;
if (status & IRQ_RXD_ERR_MASK) {
dev_dbg(host->dev, "Unhandled IRQ: RXD error\n");
@@ -608,10 +610,8 @@ out:
/* ack all (enabled) interrupts */
writel(status, host->regs + SD_EMMC_STATUS);
- if (ret == IRQ_HANDLED) {
- meson_mmc_read_resp(host->mmc, cmd);
+ if (ret == IRQ_HANDLED)
meson_mmc_request_done(host->mmc, cmd->mrq);
- }
spin_unlock(&host->lock);
return ret;
@@ -636,7 +636,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)
data->bytes_xfered = xfer_bytes;
}
- meson_mmc_read_resp(host->mmc, cmd);
if (!data || !data->stop || cmd->mrq->sbc)
meson_mmc_request_done(host->mmc, cmd->mrq);
else