RE: [PATCH 1/2] mmc: dw_mmc: Cleanup disable of low power mode w/ SDIO interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, October 29, 2013, Doug Anderson wrote
> Seungwon,
> 
> On Fri, Oct 25, 2013 at 2:29 AM, Seungwon Jeon <tgih.jun@xxxxxxxxxxx> 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


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux