All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Kevin Hilman <khilman@mvista.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH/RFC] ARM: OMAP2: PRCM: more init, and clear wakeup events.
Date: Fri, 16 Nov 2007 16:01:07 -0800	[thread overview]
Message-ID: <20071117000107.GO32675@atomide.com> (raw)
In-Reply-To: <20071101231156.378789006@mvista.com>

* Kevin Hilman <khilman@mvista.com> [071101 16:13]:
> 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 */
> --

Pushing today.

Tony

      reply	other threads:[~2007-11-17  0:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 23:11 [PATCH/RFC] ARM: OMAP2: PRCM: more init, and clear wakeup events Kevin Hilman
2007-11-17  0:01 ` 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=20071117000107.GO32675@atomide.com \
    --to=tony@atomide.com \
    --cc=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 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.