Commit 1f8066d9 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Ulf Hansson

mmc: meson-gx: improve response reading

Response reading can be slightly improved by doing it in just one place.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Reviewed-by: default avatarKevin Hilman <khilman@baylibre.com>
parent a322febe
...@@ -562,6 +562,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) ...@@ -562,6 +562,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
goto out; goto out;
} }
meson_mmc_read_resp(host->mmc, cmd);
cmd->error = 0; cmd->error = 0;
if (status & IRQ_RXD_ERR_MASK) { if (status & IRQ_RXD_ERR_MASK) {
dev_dbg(host->dev, "Unhandled IRQ: RXD error\n"); dev_dbg(host->dev, "Unhandled IRQ: RXD error\n");
...@@ -608,10 +610,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) ...@@ -608,10 +610,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
/* ack all (enabled) interrupts */ /* ack all (enabled) interrupts */
writel(status, host->regs + SD_EMMC_STATUS); writel(status, host->regs + SD_EMMC_STATUS);
if (ret == IRQ_HANDLED) { if (ret == IRQ_HANDLED)
meson_mmc_read_resp(host->mmc, cmd);
meson_mmc_request_done(host->mmc, cmd->mrq); meson_mmc_request_done(host->mmc, cmd->mrq);
}
spin_unlock(&host->lock); spin_unlock(&host->lock);
return ret; return ret;
...@@ -636,7 +636,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id) ...@@ -636,7 +636,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)
data->bytes_xfered = xfer_bytes; data->bytes_xfered = xfer_bytes;
} }
meson_mmc_read_resp(host->mmc, cmd);
if (!data || !data->stop || cmd->mrq->sbc) if (!data || !data->stop || cmd->mrq->sbc)
meson_mmc_request_done(host->mmc, cmd->mrq); meson_mmc_request_done(host->mmc, cmd->mrq);
else else
......
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