linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seungwon Jeon <tgih.jun@samsung.com>
To: 'Doug Anderson' <dianders@chromium.org>
Cc: 'Jaehoon Chung' <jh80.chung@samsung.com>,
	'Chris Ball' <cjb@laptop.org>,
	'James Hogan' <james.hogan@imgtec.com>,
	'Grant Grundler' <grundler@chromium.org>,
	'Alim Akhtar' <alim.akhtar@samsung.com>,
	'Abhilash Kesavan' <a.kesavan@samsung.com>,
	'Tomasz Figa' <tomasz.figa@gmail.com>,
	'Olof Johansson' <olof@lixom.net>,
	'Sonny Rao' <sonnyrao@chromium.org>,
	'Bing Zhao' <bzhao@marvell.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: RE: [PATCH 1/2] mmc: dw_mmc: Cleanup disable of low power mode w/ SDIO interrupts
Date: Fri, 01 Nov 2013 14:23:29 +0900	[thread overview]
Message-ID: <001301ced6c2$7fe533d0$7faf9b70$%jun@samsung.com> (raw)
In-Reply-To: <CAD=FV=VLNdNMg2gAj7yUs2ZgP0GqO5SOQLARq+p1qQTGwFDsQQ@mail.gmail.com>

On Tue, October 29, 2013, Doug Anderson wrote
> Seungwon,
> 
> On Fri, Oct 25, 2013 at 2:29 AM, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> >> By SDIO devices, are you referring to actual SDIO cards or some
> >> implementations of dw_mmc?
> >>
> >> As far as I understand in the CLKENA description in the generic
> >> documentation from Synopsys it say that for SDIO cards you must not
> >> stop the clock if interrupts must be detected.  To me, that means that
> >> all dw_mmc implementations require this change if they support SDIO
> >> interrupts (hence checking for MMC_CAP_SDIO_IRQ).
> >
> > CLKENA description in manual means that host controller can't detect the SDIO interrupt signal
> > or wifi device can't generate the interrupt without clock?
> 
> My reading of the "if interrupts must be detected" in the manual
> implies that that interrupts simply can't be detected by the
> controller.
I just wanted to know your opinion because I was not convinced that.
But, as far as I know, interrupt is generated by device with clock sync.
If clock is stopped, device may not issue interrupt.
This is the reason that interrupt is not detected.
Ok. Anyway, clock should be required for synchronous interrupt.

> 
> 
> > Host controller based on Synopsys supports asynchronous interrupts. It seems to depend on wifi
> Device.
> > If host can do and  wifi device can also work with clock gating, we may enable low-power mode.
> 
> Ah, interesting!  I wish I had known about this earlier and we could
> have actually used it in our designs.  Please correct me if I'm wrong
> but...
> 
> It looks like asynchronous interrupts is when you use a separate INT#
> line for your SDIO interrupts and is available only for eSDIO
> (embedded SDIO?), right.  ...so that means it more a property of the
> board rather than the card itself.  In other words: to use
> asynchronous interrupts you need to be on a SoC that supports the INT#
> line, you need to have it wired up to an eSDIO module, and you need
> the eSDIO card to support it.
Right. But we cannot say without the device which supports INT#.
For asynchronous interrupt, device should be mounted on target board.

> 
> Assuming that I understand all of the above I'd suggest (in a future
> patch) that we add a property like 'dedicated-sdio-irq' to device
> trees.  If we see this property AND we don't see
> MMC_QUIRK_BROKEN_CLK_GATING then we know we don't need to disable
> clock gating.
> 
> Does that sound right?  If so I'd still love to land my patch and we
> could add the extra logic in a separate patch.
Ok. I like it. Will you send it with this series?
If not, existing MMC_QUIRK_BROKEN_CLK_GATING could be considered at this time.
And, could you modify your comment message more definitely?

> 
> 
> > For MMC_QUIRK_BROKEN_CLK_GATING, I referred the code in 'mmc/core/quirks.c'
> > In addition, although host can support MMC_CAP_SDIO_IRQ, some wifi drivers use
> > OOB(Out-of-band) interrupt. That means host can apply clock gating to reduce
> > power consumption.
> 
> I think OOB interrupt is the same as asynchronous interrupt, but if
> I'm wrong please correct me.
Yes. Eventually both mechanisms are asynchronous.
Additionally, OOB I mentioned comes from some wlan driver commit & implementation.
I guess it doesn't indicate OOB of SDIO specification 4.0 and it's not same.

Thanks,
Seungwon Jeon



  reply	other threads:[~2013-11-01  5:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 22:39 [PATCH 0/2] Prevent races when doing read-modify-write of INTMASK Doug Anderson
2013-10-15 22:39 ` [PATCH 1/2] mmc: dw_mmc: Cleanup disable of low power mode w/ SDIO interrupts Doug Anderson
2013-10-18  9:42   ` Jaehoon Chung
2013-10-18 20:09     ` Doug Anderson
2013-10-23 11:25       ` Seungwon Jeon
2013-10-24  7:28         ` Doug Anderson
2013-10-25  9:29           ` Seungwon Jeon
2013-10-28 22:39             ` Doug Anderson
2013-11-01  5:23               ` Seungwon Jeon [this message]
2013-10-15 22:39 ` [PATCH 2/2] mmc: dw_mmc: Protect read-modify-write of INTMASK with a lock Doug Anderson
2013-10-16  9:49   ` James Hogan
2013-10-16 16:43     ` Doug Anderson
2013-10-16 20:23       ` James Hogan
2013-10-18  9:51         ` Jaehoon Chung
2013-10-18 20:09           ` Doug Anderson

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='001301ced6c2$7fe533d0$7faf9b70$%jun@samsung.com' \
    --to=tgih.jun@samsung.com \
    --cc=a.kesavan@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=bzhao@marvell.com \
    --cc=cjb@laptop.org \
    --cc=dianders@chromium.org \
    --cc=grundler@chromium.org \
    --cc=james.hogan@imgtec.com \
    --cc=jh80.chung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sonnyrao@chromium.org \
    --cc=tomasz.figa@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;
as well as URLs for NNTP newsgroup(s).