All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Simon Horman <horms@verge.net.au>
Cc: linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org,
	Chris Ball <cjb@laptop.org>, Magnus Damm <magnus.damm@gmail.com>,
	Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 3/4] mmc: sdhi: Make use of per-source irq handlers
Date: Wed, 17 Aug 2011 12:22:56 +0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1108171416010.18317@axis700.grange> (raw)
In-Reply-To: <20110817120748.GB13086@verge.net.au>

On Wed, 17 Aug 2011, Simon Horman wrote:

> On Wed, Aug 17, 2011 at 08:41:47PM +0900, Simon Horman wrote:
> > On Wed, Aug 17, 2011 at 01:24:58PM +0200, Guennadi Liakhovetski wrote:
> > > On Wed, 17 Aug 2011, Simon Horman wrote:
> > > 
> > > > Make use of per-source irq handles if the
> > > > platform (data) has multiple irq sources.
> > > > 
> > > > Also, as suggested by Guennadi Liakhovetski,
> > > > add and use defines the index or irqs in platform data.
> > > > 
> > > > Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > > Cc: Magnus Damm <magnus.damm@gmail.com>
> > > > Signed-off-by: Simon Horman <horms@verge.net.au>
> > > > 
> > > > ---
> > > > 
> > > > v5
> > > > * As suggested by Guennadi Liakhovetski:
> > > >   - Allow only SH_MOBILE_SDHI_IRQ_SDCARD and
> > > >     SH_MOBILE_SDHI_IRQ_SDIO to be specified in platform data
> > > 
> > > This means, CARD_DETECT is optional in a multi-irq configuration, agree.
> > 
> > [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;
> > > >  	}
> > > 
> > > This means SDCARD is optional in both single- and multi-irq 
> > > configurations.
> > > 
> > > > +
> > > > +	ret = irq = platform_get_irq(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT);
> > > > +	if (irq < 0)
> > > > +		goto eirq_card_detect;
> > > 
> > > This means, CARD_DETECT is compulsory in all configurations.
> > > 
> > > One of us must be speaking klingonish today.
> > 
> > Sorry, I messed that up a bit.
> > 
> > I will make CARD_DETECT optional in multi-irq configurations.
> > Likewise SDIO will be optional in multi-irq configurations.
> > 
> > But SDCARD will always be required.
> 
> Oops, that scheme won't work because in single-irq configuration
> the only IRQ will be #0, but SDCARD != 0.
> 
> So I have it in mind to allow the following combinations.
> 
> i) SDIO, SDCARD, CARD_DETECT
> ii) SDIO, SDCARD
> iii) SDCARD, CARD_DETECT
> iv) SDCARD only (sets multi_irq = true locally, but only one irq!)
> v) CARD_DETECT only (uses tmio_mmc_irq(), traditional single-irq setup)

I would make it simple:

(1) 1 IRQ: only resource #0 (CARD_DETECT, use tmio_mmc_irq())
(2) 2 or 3 IRQs: compulsory SDCARD and any further IRQs: use respective 
    specialised ISRs.

> Do you think iii and iv are necessary?

Accordingly: iii - yes, iv - no.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

WARNING: multiple messages have this Message-ID (diff)
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Simon Horman <horms@verge.net.au>
Cc: linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org,
	Chris Ball <cjb@laptop.org>, Magnus Damm <magnus.damm@gmail.com>,
	Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 3/4] mmc: sdhi: Make use of per-source irq handlers
Date: Wed, 17 Aug 2011 14:22:56 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.1108171416010.18317@axis700.grange> (raw)
In-Reply-To: <20110817120748.GB13086@verge.net.au>

On Wed, 17 Aug 2011, Simon Horman wrote:

> On Wed, Aug 17, 2011 at 08:41:47PM +0900, Simon Horman wrote:
> > On Wed, Aug 17, 2011 at 01:24:58PM +0200, Guennadi Liakhovetski wrote:
> > > On Wed, 17 Aug 2011, Simon Horman wrote:
> > > 
> > > > Make use of per-source irq handles if the
> > > > platform (data) has multiple irq sources.
> > > > 
> > > > Also, as suggested by Guennadi Liakhovetski,
> > > > add and use defines the index or irqs in platform data.
> > > > 
> > > > Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > > Cc: Magnus Damm <magnus.damm@gmail.com>
> > > > Signed-off-by: Simon Horman <horms@verge.net.au>
> > > > 
> > > > ---
> > > > 
> > > > v5
> > > > * As suggested by Guennadi Liakhovetski:
> > > >   - Allow only SH_MOBILE_SDHI_IRQ_SDCARD and
> > > >     SH_MOBILE_SDHI_IRQ_SDIO to be specified in platform data
> > > 
> > > This means, CARD_DETECT is optional in a multi-irq configuration, agree.
> > 
> > [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;
> > > >  	}
> > > 
> > > This means SDCARD is optional in both single- and multi-irq 
> > > configurations.
> > > 
> > > > +
> > > > +	ret = irq = platform_get_irq(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT);
> > > > +	if (irq < 0)
> > > > +		goto eirq_card_detect;
> > > 
> > > This means, CARD_DETECT is compulsory in all configurations.
> > > 
> > > One of us must be speaking klingonish today.
> > 
> > Sorry, I messed that up a bit.
> > 
> > I will make CARD_DETECT optional in multi-irq configurations.
> > Likewise SDIO will be optional in multi-irq configurations.
> > 
> > But SDCARD will always be required.
> 
> Oops, that scheme won't work because in single-irq configuration
> the only IRQ will be #0, but SDCARD != 0.
> 
> So I have it in mind to allow the following combinations.
> 
> i) SDIO, SDCARD, CARD_DETECT
> ii) SDIO, SDCARD
> iii) SDCARD, CARD_DETECT
> iv) SDCARD only (sets multi_irq = true locally, but only one irq!)
> v) CARD_DETECT only (uses tmio_mmc_irq(), traditional single-irq setup)

I would make it simple:

(1) 1 IRQ: only resource #0 (CARD_DETECT, use tmio_mmc_irq())
(2) 2 or 3 IRQs: compulsory SDCARD and any further IRQs: use respective 
    specialised ISRs.

> Do you think iii and iv are necessary?

Accordingly: iii - yes, iv - no.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

  reply	other threads:[~2011-08-17 12:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 10:59 [PATCH 0/4 v5] mmc: tmio, sdhi: provide multiple irq handlers Simon Horman
2011-08-17 10:59 ` Simon Horman
2011-08-17 10:59 ` [PATCH 1/4] mmc: tmio: Cache interrupt masks Simon Horman
2011-08-17 10:59   ` Simon Horman
2011-08-17 10:59 ` [PATCH 2/4] mmc: tmio: Provide separate interrupt handlers Simon Horman
2011-08-17 10:59   ` Simon Horman
2011-08-17 10:59 ` [PATCH 3/4] mmc: sdhi: Make use of per-source irq handlers Simon Horman
2011-08-17 10:59   ` Simon Horman
2011-08-17 11:24   ` Guennadi Liakhovetski
2011-08-17 11:24     ` Guennadi Liakhovetski
2011-08-17 11:41     ` Simon Horman
2011-08-17 11:41       ` Simon Horman
2011-08-17 11:54       ` Guennadi Liakhovetski
2011-08-17 11:54         ` Guennadi Liakhovetski
2011-08-17 12:07       ` Simon Horman
2011-08-17 12:07         ` Simon Horman
2011-08-17 12:22         ` Guennadi Liakhovetski [this message]
2011-08-17 12:22           ` Guennadi Liakhovetski
2011-08-17 12:57           ` Simon Horman
2011-08-17 12:57             ` Simon Horman
2011-08-17 22:02             ` [PATCH 3/4 v7] " Guennadi Liakhovetski
2011-08-17 22:02               ` Guennadi Liakhovetski
2011-08-17 10:59 ` [PATCH 4/4] ARM: shmobile: ag5evm, ap4: Make use of irq index enum Simon Horman
2011-08-17 10:59   ` 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-19  1:10   ` Simon Horman
2011-08-17  0:50 [PATCH 0/4 v4] mmc: tmio, sdhi: provide multiple " Simon Horman
2011-08-17  0:50 ` [PATCH 3/4] mmc: sdhi: Make use of per-source " Simon Horman
2011-08-17  0:50   ` Simon Horman
2011-08-17  8:20   ` Guennadi Liakhovetski
2011-08-17  8:20     ` Guennadi Liakhovetski
2011-08-17  9:49     ` Simon Horman
2011-08-17  9:49       ` Simon Horman
2011-08-17 10:06       ` Guennadi Liakhovetski
2011-08-17 10:06         ` Guennadi Liakhovetski
2011-08-17 10:46         ` Simon Horman
2011-08-17 10:46           ` 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 10:11   ` Simon Horman
2011-08-16 11:11   ` Guennadi Liakhovetski
2011-08-16 11:11     ` Guennadi Liakhovetski
2011-08-16 11:51     ` Simon Horman
2011-08-16 11:51       ` Simon Horman
2011-08-16 12:40       ` Guennadi Liakhovetski
2011-08-16 12:40         ` Guennadi Liakhovetski
2011-08-16 13:45         ` Simon Horman
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=Pine.LNX.4.64.1108171416010.18317@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=cjb@laptop.org \
    --cc=horms@verge.net.au \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.