From: Simon Horman <horms@verge.net.au>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org,
Chris Ball <cjb@laptop.org>, Paul Mundt <lethal@linux-sh.org>,
Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [PATCH 3/4] mmc: sdhi: Make use of per-source irq handlers
Date: Wed, 17 Aug 2011 19:46:08 +0900 [thread overview]
Message-ID: <20110817104605.GA6586@verge.net.au> (raw)
In-Reply-To: <Pine.LNX.4.64.1108171154270.18317@axis700.grange>
On Wed, Aug 17, 2011 at 12:06:56PM +0200, Guennadi Liakhovetski wrote:
> On Wed, 17 Aug 2011, Simon Horman wrote:
>
> > On Wed, Aug 17, 2011 at 10:20:24AM +0200, Guennadi Liakhovetski wrote:
> > > On Wed, 17 Aug 2011, Simon Horman wrote:
> >
> > [snip ]
> >
> > > > + ret = irq = platform_get_irq(pdev, SH_MOBILE_SDHI_IRQ_SDCARD);
> > > > + if (irq >= 0) {
> > > > + multi_irq = true;
> > > > + ret = request_irq(irq, tmio_mmc_sdcard_irq, 0,
> > > > + dev_name(&pdev->dev), host);
> > > > + if (ret)
> > > > + goto eirq_sdcard;
> > > > + } else if (multi_irq)
> > > > + goto eirq_sdcard;
> > > > +
> > > > + ret = irq = platform_get_irq(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT);
> > > > + if (irq < 0)
> > > > + goto eirq_card_detect;
> > > > + f = multi_irq ? tmio_mmc_card_detect_irq : tmio_mmc_irq;
> > > > + ret = request_irq(irq, f, 0, dev_name(&pdev->dev), host);
> > > > + if (ret)
> > > > + goto eirq_card_detect;
> > > > +
> > >
> > > I still don't see why a multi-IRQ configuration without a card-detect IRQ
> > > like
> > >
> > > static struct resource sdhi_resources[] = {
> > > [0] = {
> > > .name = "SDHI2",
> > > ...,
> > > },
> > > [1 + SH_MOBILE_SDHI_IRQ_SDCARD] = {
> > > .start = ...,
> > > .flags = IORESOURCE_IRQ,
> > > },
> > > [1 + SH_MOBILE_SDHI_IRQ_SDIO] = {
> > > .start = ...,
> > > .flags = IORESOURCE_IRQ,
> > > },
> > > };
> > >
> > > should be invalid. Especially since we actually want to avoid using the
> > > controller card-detect IRQ for power efficiency and use a GPIO instead.
> >
> > Ok, in this case you would like SH_MOBILE_SDHI_IRQ_SDCARD to use
> > tmio_mmc_sdcard_irq() ?
>
> This is a good question. I think your erroring out is wrong, but I'm not
> sure what is best here. Using sdcard and sdio ISR in this case seems most
> logical to me. But I don't know if we ever can get hardware, where we
> indeed only have two SDHI interrupts - one for SDIO and one for SDCARD and
> CARD_DETECT. I'm not aware of such hardware so far, so, yes, I'd go with
> SDIO and SDCARD ISRs for now. In any case, this is SDHI internal decision,
> so, we can change it at any time, if we need to.
Agreed.
next prev parent reply other threads:[~2011-08-17 10:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 0:50 [PATCH 0/4 v4] mmc: tmio, sdhi: provide multiple irq handlers Simon Horman
2011-08-17 0:50 ` [PATCH 1/4] mmc: tmio: Cache interrupt masks Simon Horman
2011-08-17 0:50 ` [PATCH 2/4] mmc: tmio: Provide separate interrupt handlers Simon Horman
2011-08-17 0:50 ` [PATCH 3/4] mmc: sdhi: Make use of per-source irq handlers Simon Horman
2011-08-17 8:20 ` Guennadi Liakhovetski
2011-08-17 9:49 ` Simon Horman
2011-08-17 10:06 ` Guennadi Liakhovetski
2011-08-17 10:46 ` Simon Horman [this message]
2011-08-17 0:50 ` [PATCH 4/4] ARM: shmobile: ag5evm, ap4: Make use of irq index enum Simon Horman
-- strict thread matches above, loose matches on Subject: below --
2011-08-19 1:10 [PATCH 0/4 v6] mmc: tmio, sdhi: provide multiple irq handlers Simon Horman
2011-08-19 1:10 ` [PATCH 3/4] mmc: sdhi: Make use of per-source " Simon Horman
2011-08-17 10:59 [PATCH 0/4 v5] mmc: tmio, sdhi: provide multiple " Simon Horman
2011-08-17 10:59 ` [PATCH 3/4] mmc: sdhi: Make use of per-source " Simon Horman
2011-08-17 11:24 ` Guennadi Liakhovetski
2011-08-17 11:41 ` Simon Horman
2011-08-17 11:54 ` Guennadi Liakhovetski
2011-08-17 12:07 ` Simon Horman
2011-08-17 12:22 ` Guennadi Liakhovetski
2011-08-17 12:57 ` Simon Horman
2011-08-16 10:11 [PATCH 0/4 v3] mmc: tmio, sdhi: provide multiple " Simon Horman
2011-08-16 10:11 ` [PATCH 3/4] mmc: sdhi: Make use of per-source " Simon Horman
2011-08-16 11:11 ` Guennadi Liakhovetski
2011-08-16 11:51 ` Simon Horman
2011-08-16 12:40 ` Guennadi Liakhovetski
2011-08-16 13:45 ` Simon Horman
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=20110817104605.GA6586@verge.net.au \
--to=horms@verge.net.au \
--cc=cjb@laptop.org \
--cc=g.liakhovetski@gmx.de \
--cc=lethal@linux-sh.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.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