From: Wolfram Sang <wsa@the-dreams.de>
To: linux-mmc@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
linux-renesas-soc@vger.kernel.org, linux-sh@vger.kernel.org,
Simon Horman <horms@verge.net.au>,
Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Subject: [PATCH 4/6] mmc: tmio: simplify irq handler
Date: Wed, 06 Apr 2016 09:25:32 +0000 [thread overview]
Message-ID: <1459934734-3613-5-git-send-email-wsa@the-dreams.de> (raw)
In-Reply-To: <1459934734-3613-1-git-send-email-wsa@the-dreams.de>
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Having just one irq handler again, let's include the 'card_status'
function in the main handler which is way more readable. Drop a useless
debug output while here. It should be a dev_dbg in case we ever need it
again.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/mmc/host/tmio_mmc_pio.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index a7250a5fa670c5..879e0f5455ef44 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -632,19 +632,6 @@ out:
spin_unlock(&host->lock);
}
-static void tmio_mmc_card_irq_status(struct tmio_mmc_host *host,
- int *ireg, int *status)
-{
- *status = sd_ctrl_read32(host, CTL_STATUS);
- *ireg = *status & TMIO_MASK_IRQ & ~host->sdcard_irq_mask;
-
- pr_debug_status(*status);
- pr_debug_status(*ireg);
-
- /* Clear the status except the interrupt status */
- sd_ctrl_write32(host, CTL_STATUS, TMIO_MASK_IRQ);
-}
-
static bool __tmio_mmc_card_detect_irq(struct tmio_mmc_host *host,
int ireg, int status)
{
@@ -722,9 +709,15 @@ irqreturn_t tmio_mmc_irq(int irq, void *devid)
struct tmio_mmc_host *host = devid;
unsigned int ireg, status;
- pr_debug("MMC IRQ begin\n");
+ status = sd_ctrl_read32(host, CTL_STATUS);
+ ireg = status & TMIO_MASK_IRQ & ~host->sdcard_irq_mask;
+
+ pr_debug_status(status);
+ pr_debug_status(ireg);
+
+ /* Clear the status except the interrupt status */
+ sd_ctrl_write32(host, CTL_STATUS, TMIO_MASK_IRQ);
- tmio_mmc_card_irq_status(host, &ireg, &status);
if (__tmio_mmc_card_detect_irq(host, ireg, status))
return IRQ_HANDLED;
if (__tmio_mmc_sdcard_irq(host, ireg, status))
--
2.7.0
next prev parent reply other threads:[~2016-04-06 9:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 9:25 [PATCH 0/6] mmc: tmio/sdhi: clean up cruft Wolfram Sang
2016-04-06 9:25 ` [PATCH 1/6] mmc: sh_mobile_sdhi: don't use array for DT configs Wolfram Sang
2016-04-06 9:56 ` Geert Uytterhoeven
2016-04-06 10:27 ` Wolfram Sang
2016-04-06 9:25 ` [PATCH 2/6] mmc: sh_mobile_sdhi: remove obsolete irq_by_name registration Wolfram Sang
2016-04-18 8:21 ` Ulf Hansson
2016-04-19 9:37 ` Wolfram Sang
2016-04-27 22:54 ` Rich Felker
2016-04-28 3:59 ` Yoshinori Sato
2016-04-28 6:19 ` Wolfram Sang
2016-04-28 8:03 ` Geert Uytterhoeven
2016-04-26 15:47 ` Wolfram Sang
2016-04-06 9:25 ` [PATCH 3/6] mmc: tmio: remove now unneeded seperate irq handlers Wolfram Sang
2016-04-06 9:25 ` Wolfram Sang [this message]
2016-04-06 9:25 ` [PATCH 5/6] mmc: tmio: merge distributed include files Wolfram Sang
2016-04-06 9:34 ` [PATCH v2 " Wolfram Sang
2016-04-06 9:25 ` [PATCH 6/6] mmc: sh_mobile_sdhi: simplify code for voltage switching Wolfram Sang
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=1459934734-3613-5-git-send-email-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@gmail.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sh@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).