From: Chris Ball <cjb@laptop.org>
To: Kevin Liu <keyuan.liu@gmail.com>
Cc: linux-mmc@vger.kernel.org
Subject: Re: sdhci: sdio wakeup and free_irq
Date: Mon, 24 Sep 2012 00:47:56 -0400 [thread overview]
Message-ID: <m38vc0do1v.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <CADz5_gJm8P=azzTsLUOJUeWo_d=vry2WFKWH93yYExVUpXYFPQ@mail.gmail.com> (Kevin Liu's message of "Mon, 24 Sep 2012 12:21:36 +0800")
Hi,
On Mon, Sep 24 2012, Kevin Liu wrote:
> So if the irq is disabled, then system can't be woken up.
You're assuming that the host controller IRQ is the method used to wake
up the system, but I just told you that the SDIO data line in 1-bit mode
should be used to wake up the system. I don't know of any systems
where the host controller IRQ is used.
On the systems that I know about (e.g. MMP2, MMP3) there's an interrupt
controller and a wakeup controller (PMU). You need to configure your
wakeup controller to pay attention to the card's data line (*not* the
host controller's interrupt line) to wake the system. It doesn't matter
that the host controller's interrupt line is being freed, because it's
not how the system gets woken up.
After the PMU wakes us up, we re-register the IRQ line and handle
the pending IRQ there. But the IRQ line itself isn't what wakes us.
e.g.:
#define WLAN_1BIT_MODE_IRQ 39
unsigned long mfpr;
mfpr = mfp_read(WLAN_1BIT_MODE_IRQ);
if (mmc_card_wake_sdio_irq(host->mmc))
{
mfpr &= ~(MFPR_EDGE_CLEAR|MFPR_EDGE_RISE);
mfpr |= MFPR_EDGE_FALL;
mfpr |= MFPR_PULLUP_EN;
}
mfp_write(WLAN_1BIT_MODE_IRQ, mfpr);
Which platform are you working on?
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2012-09-24 4:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 9:20 sdhci: sdio wakeup and free_irq Kevin Liu
2012-09-24 3:25 ` Chris Ball
2012-09-24 4:21 ` Kevin Liu
2012-09-24 4:47 ` Chris Ball [this message]
2012-09-24 5:54 ` Kevin Liu
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=m38vc0do1v.fsf@pullcord.laptop.org \
--to=cjb@laptop.org \
--cc=keyuan.liu@gmail.com \
--cc=linux-mmc@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