From: Vikram Pandita <vikram.pandita@ti.com>
To: khilman@deeprootsystems.com
Cc: linux-omap@vger.kernel.org, Vikram Pandita <vikram.pandita@ti.com>
Subject: [PATCH v2] OMAP3: PM: USBHOST: clear wakeup events on both hosts
Date: Fri, 17 Jul 2009 19:33:09 -0500 [thread overview]
Message-ID: <1247877189-5754-1-git-send-email-vikram.pandita@ti.com> (raw)
USBHOST module has 2 fclocks (for HOST1 and HOST2), only one iclock
and only a single bit in the WKST register to indicate a wakeup event.
Because of the single WKST bit, we cannot know whether a wakeup event
was on HOST1 or HOST2, so enable both fclocks before clearing the
wakeup event to ensure both hosts can properly clear the event.
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
---
arch/arm/mach-omap2/pm34xx.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index e80d59f..2430bed 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -264,8 +264,13 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id)
CM_FCLKEN);
cm_set_mod_reg_bits(wkst, OMAP3430ES2_USBHOST_MOD,
CM_ICLKEN);
- cm_set_mod_reg_bits(wkst, OMAP3430ES2_USBHOST_MOD,
- CM_FCLKEN);
+ /* We don't know whether HOST1 or HOST2 woke us up,
+ * so enable both clocks
+ */
+ cm_set_mod_reg_bits(wkst |
+ (1<<OMAP3430ES2_EN_USBHOST2_SHIFT),
+ OMAP3430ES2_USBHOST_MOD,
+ CM_FCLKEN);
prm_write_mod_reg(wkst, OMAP3430ES2_USBHOST_MOD,
PM_WKST);
while (prm_read_mod_reg(OMAP3430ES2_USBHOST_MOD,
--
1.6.3.3.334.g916e1
next reply other threads:[~2009-07-18 0:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-18 0:33 Vikram Pandita [this message]
2009-07-19 13:35 ` [PATCH v2] OMAP3: PM: USBHOST: clear wakeup events on both hosts Woodruff, Richard
2009-07-19 13:39 ` Woodruff, Richard
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=1247877189-5754-1-git-send-email-vikram.pandita@ti.com \
--to=vikram.pandita@ti.com \
--cc=khilman@deeprootsystems.com \
--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 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.