From: Kevin Hilman <khilman@mvista.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH/RFC] ARM: OMAP2: PRCM: more init, and clear wakeup events.
Date: Thu, 01 Nov 2007 16:11:56 -0700 [thread overview]
Message-ID: <20071101231156.378789006@mvista.com> (raw)
More initialization of wake dependencies.
Clear PRCM wake-up events after coming out of full-retention.
Signed-off-by: Kevin Hilman <khilman@mvista.com>
---
arch/arm/mach-omap2/pm.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
Index: dev/arch/arm/mach-omap2/pm.c
===================================================================
--- dev.orig/arch/arm/mach-omap2/pm.c
+++ dev/arch/arm/mach-omap2/pm.c
@@ -397,7 +397,7 @@ void omap2_allow_sleep(void)
static void omap2_enter_full_retention(void)
{
- u32 sleep_time = 0;
+ u32 l, sleep_time = 0;
/* There is 1 reference hold for all children of the oscillator
* clock, the following will remove it. If no one else uses the
@@ -450,6 +450,24 @@ no_sleep:
clk_enable(osc_ck);
+ /* clear CORE wake-up events */
+ prm_write_mod_reg(0xffffffff, CORE_MOD, PM_WKST1);
+ prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP24XX_PM_WKST2);
+
+ /* wakeup domain events */
+ l = prm_read_mod_reg(WKUP_MOD, PM_WKST);
+ l &= 0x5; /* bit 1: GPT1, bit5 GPIO */
+ prm_write_mod_reg(l, WKUP_MOD, PM_WKST);
+
+ /* MPU domain wake events */
+ l = prm_read_reg(OMAP24XX_PRCM_IRQSTATUS_MPU);
+ if (l & 0x01)
+ prm_write_reg(0x01, OMAP24XX_PRCM_IRQSTATUS_MPU);
+ if (l & 0x20)
+ prm_write_reg(0x20, OMAP24XX_PRCM_IRQSTATUS_MPU);
+
+ /* Mask future PRCM-to-MPU interrupts */
+ prm_write_reg(0x0, OMAP24XX_PRCM_IRQSTATUS_MPU);
}
static int omap2_i2c_active(void)
@@ -654,6 +672,9 @@ static void __init prcm_setup_regs(void)
prm_write_mod_reg(OMAP_EN_WKUP, MPU_MOD, PM_WKDEP);
prm_write_mod_reg(0, OMAP24XX_DSP_MOD, PM_WKDEP);
prm_write_mod_reg(0, GFX_MOD, PM_WKDEP);
+ prm_write_mod_reg(0, CORE_MOD, PM_WKDEP);
+ if (cpu_is_omap2430())
+ prm_write_mod_reg(0, OMAP2430_MDM_MOD, PM_WKDEP);
l = prm_read_mod_reg(CORE_MOD, PM_PWSTCTRL);
/* Enable retention for all memory blocks */
--
next reply other threads:[~2007-11-01 23:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 23:11 Kevin Hilman [this message]
2007-11-17 0:01 ` [PATCH/RFC] ARM: OMAP2: PRCM: more init, and clear wakeup events Tony Lindgren
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=20071101231156.378789006@mvista.com \
--to=khilman@mvista.com \
--cc=linux-omap-open-source@linux.omap.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