public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Kalle Jokiniemi <kalle.jokiniemi@digia.com>
Cc: linux-omap@vger.kernel.org, jouni.hogander@nokia.com
Subject: Re: [PATCH 1/1] ARM: OMAP: Add missing SMS_SYSCONFIG save/restore
Date: Wed, 13 May 2009 09:49:51 -0700	[thread overview]
Message-ID: <87hbzp6j80.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1242210731-26249-2-git-send-email-kalle.jokiniemi@digia.com> (Kalle Jokiniemi's message of "Wed\, 13 May 2009 13\:32\:11 +0300")

Kalle Jokiniemi <kalle.jokiniemi@digia.com> writes:

> SMS_SYSCONFIG register gets reset in off mode, added
> a save/restore mechanism for that.
>
> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com>

Thanks, pushing to PM branch.

Kevin

> ---
>  arch/arm/mach-omap2/pm34xx.c           |    1 +
>  arch/arm/mach-omap2/sdrc.c             |   27 +++++++++++++++++++++++++++
>  arch/arm/plat-omap/include/mach/sdrc.h |    2 ++
>  3 files changed, 30 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 60a1c4c..6e286ef 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -439,6 +439,7 @@ void omap_sram_idle(void)
>  			omap3_core_restore_context();
>  			omap3_prcm_restore_context();
>  			omap3_sram_restore_context();
> +			omap2_sms_restore_context();
>  		}
>  		omap_uart_resume_idle(0);
>  		omap_uart_resume_idle(1);
> diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
> index 2045441..c832d83 100644
> --- a/arch/arm/mach-omap2/sdrc.c
> +++ b/arch/arm/mach-omap2/sdrc.c
> @@ -37,12 +37,38 @@ static struct omap_sdrc_params *sdrc_init_params;
>  void __iomem *omap2_sdrc_base;
>  void __iomem *omap2_sms_base;
>  
> +struct omap2_sms_regs {
> +	u32	sms_sysconfig;
> +};
> +
> +static struct omap2_sms_regs sms_context;
> +
>  /* SDRC_POWER register bits */
>  #define SDRC_POWER_EXTCLKDIS_SHIFT		3
>  #define SDRC_POWER_PWDENA_SHIFT			2
>  #define SDRC_POWER_PAGEPOLICY_SHIFT		0
>  
>  /**
> + * omap2_sms_save_context - Save SMS registers
> + *
> + * Save SMS registers that need to be restored after off mode.
> + */
> +void omap2_sms_save_context(void)
> +{
> +	sms_context.sms_sysconfig = sms_read_reg(SMS_SYSCONFIG);
> +}
> +
> +/**
> + * omap2_sms_restore_context - Restore SMS registers
> + *
> + * Restore SMS registers that need to be Restored after off mode.
> + */
> +void omap2_sms_restore_context(void)
> +{
> +	sms_write_reg(sms_context.sms_sysconfig, SMS_SYSCONFIG);
> +}
> +
> +/**
>   * omap2_sdrc_get_params - return SDRC register values for a given clock rate
>   * @r: SDRC clock rate (in Hz)
>   *
> @@ -110,4 +136,5 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sp)
>  		(1 << SDRC_POWER_PWDENA_SHIFT) |
>  		(1 << SDRC_POWER_PAGEPOLICY_SHIFT);
>  	sdrc_write_reg(l, SDRC_POWER);
> +	omap2_sms_save_context();
>  }
> diff --git a/arch/arm/plat-omap/include/mach/sdrc.h b/arch/arm/plat-omap/include/mach/sdrc.h
> index a5a6cf9..a678bc8 100644
> --- a/arch/arm/plat-omap/include/mach/sdrc.h
> +++ b/arch/arm/plat-omap/include/mach/sdrc.h
> @@ -112,6 +112,8 @@ struct omap_sdrc_params {
>  	u32 mr;
>  };
>  
> +void omap2_sms_save_context(void);
> +void omap2_sms_restore_context(void);
>  void __init omap2_sdrc_init(struct omap_sdrc_params *);
>  struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r);
>  
> -- 
> 1.5.4.3

      reply	other threads:[~2009-05-13 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-13 10:32 [PATCH 0/1] ARM: OMAP: Add missing SMS_SYSCONFIG save/restore Kalle Jokiniemi
2009-05-13 10:32 ` [PATCH 1/1] " Kalle Jokiniemi
2009-05-13 16:49   ` Kevin Hilman [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=87hbzp6j80.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=jouni.hogander@nokia.com \
    --cc=kalle.jokiniemi@digia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox