linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Andreas Fenkart <afenkart@gmail.com>
Cc: Chris Ball <cjb@laptop.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Balaji T K <balajitk@ti.com>
Subject: Re: [PATCH 2/2] mmc: omap_hsmmc: Enable SDIO interrupt
Date: Fri, 27 Sep 2013 14:10:02 -0700	[thread overview]
Message-ID: <20130927211001.GG8949@atomide.com> (raw)
In-Reply-To: <CALtMJEDKxTcaNHmrVqMv7tznxB0uqYxuOix+ks+Bs_huiOCL4A@mail.gmail.com>

* Andreas Fenkart <afenkart@gmail.com> [130926 23:46]:
> 
> It's what Balaji already pointed out.
> 
> +   /* no transfer running, need to signal cirq if */
> +   if (host->sdio_irq_en)
> +       irq_mask |= CIRQ_EN;
> 
> 
> omap_hsmmc_request_done calls omap_hsmmc_disable_irq
> 
> imagine this case:
> 1. host issues transfer from host->card (e.g. get RSSI)
> 2. at end of this transfer, SDIO IRQ are being masked
> 3. card wants to reply, raises an SDIO IRQ
> 4. nothing happens, since in 2. SDIO IRQ are masked
> 
> I verified this with my 88W8787 card. It is a problem

OK thanks makes sense. 

> Something like this but shorter as a comment:
> 
> /*
>  * Must not touch registers while fclk if off, otherwise SIGBUS.
>  * Card will still wake up upon SDIO IRQ, and we'll complete
>  * the request in pm_runtime_resume
>  */
> 
> Another interpretation of your code could be:
> 
> /* Sorry I'm having Siesta right now, try later */

Well the clocking issue should be already handled by the
runtime PM, otherwise we have a bug somewhere. I'm almost
certain that no special handling is needed for register
access beyond runtime PM, but it would probably be best
if you could test it.

> Compatible section you mean, that sounds to good to me.
> But do we know platform have the deficiency?
> 
> There used to be an if statement like this in one of your previous
> patches.
> 
> +   if (match) {
> +       mmc->caps |= MMC_CAP_SDIO_IRQ;
> +       if (of_find_property(host->dev->of_node,
> +                    "ti,quirk-swakeup-missing", NULL)) {
> +           /* no wakeup from deeper power states, use polling */
> +           mmc->caps &= ~MMC_CAP_SDIO_IRQ;
> +       }
> +   }
> 
> Either or is needed, otherwise existing platforms will break, and will have
> to apply patches on top of yours to reenable polling (e.g. beaglebone)

Yes, let's merge the necessary tweaks to this patch before
applying. The SDIO interrupt should work during runtime
for all omaps, so maybe we should just ensure that runtime
PM keeps those omaps from going to deeper idle modes for
now.

Regards,

Tony

      reply	other threads:[~2013-09-27 21:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25 23:47 [PATCH 0/2] patches to enable SDIO interrupt support for omap_hsmmc for v3.13 Tony Lindgren
2013-09-25 23:47 ` [PATCH 1/2] mmc: omap_hsmmc: Fix context save and restore for DT Tony Lindgren
2013-09-25 23:47 ` [PATCH 2/2] mmc: omap_hsmmc: Enable SDIO interrupt Tony Lindgren
2013-09-26  8:26   ` Andreas Fenkart
2013-09-26 14:19     ` Tony Lindgren
2013-09-26 14:31       ` Balaji T K
2013-09-27  6:38       ` Andreas Fenkart
2013-09-27 21:10         ` Tony Lindgren [this message]

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=20130927211001.GG8949@atomide.com \
    --to=tony@atomide.com \
    --cc=afenkart@gmail.com \
    --cc=balajitk@ti.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /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).