From: Heiner Kallweit <hkallweit1@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Kevin Hilman <khilman@baylibre.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
linux-amlogic@lists.infradead.org
Subject: [PATCH 2/5] mmc: meson-gx: improve response reading
Date: Wed, 15 Mar 2017 20:33:57 +0100 [thread overview]
Message-ID: <af4174c5-7d7e-340a-2d94-6b3ecd137941@gmail.com> (raw)
In-Reply-To: <f1f8dae2-e976-4d42-99dc-34d08cb3d628@gmail.com>
Response is read in the main irq handler and in the threaded irq handler
as well. We can slightly improve this by reading the response
unconditionally at the beginning of the main irq handler only.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/mmc/host/meson-gx-mmc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index f2d4486a..e675601e 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -573,6 +573,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");
@@ -619,10 +621,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
/* 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;
@@ -647,7 +647,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
--
2.12.0
next prev parent reply other threads:[~2017-03-15 19:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 19:16 [PATCH 0/5] mmc: meson-gx: add cmd23 and descriptor chain mode Heiner Kallweit
2017-03-15 19:33 ` [PATCH 1/5] mmc: meson-gx: switch irq name to DT node name Heiner Kallweit
2017-03-15 19:33 ` Heiner Kallweit [this message]
2017-03-15 19:34 ` [PATCH 3/5] mmc: meson-gx: use block mode also for just one block Heiner Kallweit
2017-03-15 19:34 ` [PATCH 4/5] mmc: meson-gx: add support for CMD23 mode Heiner Kallweit
2017-03-15 19:34 ` [PATCH 5/5] mmc: meson-gx: switch to descriptor chain mode Heiner Kallweit
2017-03-24 19:04 ` Kevin Hilman
2017-03-24 7:27 ` [PATCH 0/5] mmc: meson-gx: add cmd23 and " Ulf Hansson
2017-03-24 18:00 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af4174c5-7d7e-340a-2d94-6b3ecd137941@gmail.com \
--to=hkallweit1@gmail.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox