From: Nicolas Pitre <nicolas.pitre@linaro.org>
To: Per Forlin <per.forlin@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
lkml <linux-kernel@vger.kernel.org>,
linaro-dev@lists.linaro.org,
Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
Subject: Re: [PATCH] sdio: optimized SDIO IRQ handling for single function
Date: Tue, 3 May 2011 23:40:23 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1105032339370.24613@xanadu.home> (raw)
In-Reply-To: <1304453087-7365-1-git-send-email-per.forlin@linaro.org>
On Tue, 3 May 2011, Per Forlin wrote:
> From: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
>
> If there is only 1 function registered, and IRQ:s are supported and
> currently enabled, call the callback handler directly
> without checking the CCCR registers.
>
> Signed-off-by: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
> Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> ---
> drivers/mmc/core/sdio_irq.c | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
> index b300161..25291bf 100644
> --- a/drivers/mmc/core/sdio_irq.c
> +++ b/drivers/mmc/core/sdio_irq.c
> @@ -32,6 +32,20 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
> int i, ret, count;
> unsigned char pending;
>
> + /*
> + * If there is only 1 function registered
> + * call irq directly without checking the CCCR registers.
> + */
> + if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
> + card->host->sdio_irqs && (card->sdio_funcs == 1))
> + for (i = 0; i < SDIO_MAX_FUNCS; i++) {
> + struct sdio_func *func = card->sdio_func[i];
> + if (func && func->irq_handler) {
> + func->irq_handler(func);
> + return 1;
> + }
> + }
> +
> ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending);
> if (ret) {
> printk(KERN_DEBUG "%s: error %d reading SDIO_CCCR_INTx\n",
> --
> 1.7.4.1
>
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>
next prev parent reply other threads:[~2011-05-04 3:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 20:04 Per Forlin
2011-05-04 3:40 ` Nicolas Pitre [this message]
2011-05-04 8:36 ` Per Forlin
2011-05-04 15:20 ` Nicolas Pitre
2011-05-04 16:03 ` Per Forlin
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=alpine.LFD.2.00.1105032339370.24613@xanadu.home \
--to=nicolas.pitre@linaro.org \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=per.forlin@linaro.org \
--cc=stefan.xk.nilsson@stericsson.com \
/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
all inboxes | Powered by JetHome®