All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: Tero Kristo <t-kristo@ti.com>
Cc: linux-omap@vger.kernel.org, paul@pwsan.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv5 8/8] ARM: OMAP4: PM: Added option for enabling OSWR
Date: Tue, 15 May 2012 15:41:39 -0700	[thread overview]
Message-ID: <87zk999ie4.fsf@ti.com> (raw)
In-Reply-To: <1336989796-26594-9-git-send-email-t-kristo@ti.com> (Tero Kristo's message of "Mon, 14 May 2012 13:03:16 +0300")

Tero Kristo <t-kristo@ti.com> writes:

> PM debug now contains a file that can be used to control OSWR support
> enable / disable on OMAP4. Also removed the off_mode_enable file for
> the same platform as it is unsupported.
>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>

I'll gladly take a patch that makes enable_off_mode OMAP3-only, but I am
not interested managing another new flag for OSWR.

For OMAP4, this should just be the default, and any drivers that are
broken just need to be fixed either by implementing context save/restore
or by using constraints.

Kevin

> ---
>  arch/arm/mach-omap2/pm-debug.c |   20 ++++++++++++++++----
>  arch/arm/mach-omap2/pm.h       |    1 +
>  arch/arm/mach-omap2/pm44xx.c   |   16 ++++++++++++++++
>  3 files changed, 33 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
> index 814bcd9..d9a8e42 100644
> --- a/arch/arm/mach-omap2/pm-debug.c
> +++ b/arch/arm/mach-omap2/pm-debug.c
> @@ -39,6 +39,7 @@
>  #include "pm.h"
>  
>  u32 enable_off_mode;
> +static u32 enable_oswr_mode;
>  
>  #ifdef CONFIG_DEBUG_FS
>  #include <linux/debugfs.h>
> @@ -247,10 +248,13 @@ static int option_set(void *data, u64 val)
>  			omap_pm_enable_off_mode();
>  		else
>  			omap_pm_disable_off_mode();
> -		if (cpu_is_omap34xx())
> -			omap3_pm_off_mode_enable(val);
> +
> +		omap3_pm_off_mode_enable(val);
>  	}
>  
> +	if (option == &enable_oswr_mode)
> +		omap4_pm_oswr_mode_enable(val);
> +
>  	return 0;
>  }
>  
> @@ -274,8 +278,16 @@ static int __init pm_dbg_init(void)
>  
>  	pwrdm_for_each(pwrdms_setup, (void *)d);
>  
> -	(void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
> -				   &enable_off_mode, &pm_dbg_option_fops);
> +	if (cpu_is_omap34xx())
> +		(void) debugfs_create_file("enable_off_mode",
> +			S_IRUGO | S_IWUSR, d, &enable_off_mode,
> +			&pm_dbg_option_fops);
> +
> +	if (cpu_is_omap44xx())
> +		(void) debugfs_create_file("enable_oswr_mode",
> +			S_IRUGO | S_IWUSR, d, &enable_oswr_mode,
> +			&pm_dbg_option_fops);
> +
>  	pm_dbg_init_done = 1;
>  
>  	return 0;
> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
> index 36fa90b..c36ab63 100644
> --- a/arch/arm/mach-omap2/pm.h
> +++ b/arch/arm/mach-omap2/pm.h
> @@ -17,6 +17,7 @@
>  
>  extern void *omap3_secure_ram_storage;
>  extern void omap3_pm_off_mode_enable(int);
> +extern void omap4_pm_oswr_mode_enable(int);
>  extern void omap_sram_idle(void);
>  extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state);
>  extern int omap3_idle_init(void);
> diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
> index cc85576..07ac0d3 100644
> --- a/arch/arm/mach-omap2/pm44xx.c
> +++ b/arch/arm/mach-omap2/pm44xx.c
> @@ -115,6 +115,22 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
>  	return omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);
>  }
>  
> +void omap4_pm_oswr_mode_enable(int enable)
> +{
> +	u32 next_logic_state;
> +	struct power_state *pwrst;
> +
> +	if (enable)
> +		next_logic_state = PWRDM_POWER_OFF;
> +	else
> +		next_logic_state = PWRDM_POWER_RET;
> +
> +	list_for_each_entry(pwrst, &pwrst_list, node) {
> +		pwrst->next_logic_state = next_logic_state;
> +		pwrdm_set_logic_retst(pwrst->pwrdm, pwrst->next_logic_state);
> +	}
> +}
> +
>  /**
>   * omap_default_idle - OMAP4 default ilde routine.'
>   *

WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv5 8/8] ARM: OMAP4: PM: Added option for enabling OSWR
Date: Tue, 15 May 2012 15:41:39 -0700	[thread overview]
Message-ID: <87zk999ie4.fsf@ti.com> (raw)
In-Reply-To: <1336989796-26594-9-git-send-email-t-kristo@ti.com> (Tero Kristo's message of "Mon, 14 May 2012 13:03:16 +0300")

Tero Kristo <t-kristo@ti.com> writes:

> PM debug now contains a file that can be used to control OSWR support
> enable / disable on OMAP4. Also removed the off_mode_enable file for
> the same platform as it is unsupported.
>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>

I'll gladly take a patch that makes enable_off_mode OMAP3-only, but I am
not interested managing another new flag for OSWR.

For OMAP4, this should just be the default, and any drivers that are
broken just need to be fixed either by implementing context save/restore
or by using constraints.

Kevin

> ---
>  arch/arm/mach-omap2/pm-debug.c |   20 ++++++++++++++++----
>  arch/arm/mach-omap2/pm.h       |    1 +
>  arch/arm/mach-omap2/pm44xx.c   |   16 ++++++++++++++++
>  3 files changed, 33 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
> index 814bcd9..d9a8e42 100644
> --- a/arch/arm/mach-omap2/pm-debug.c
> +++ b/arch/arm/mach-omap2/pm-debug.c
> @@ -39,6 +39,7 @@
>  #include "pm.h"
>  
>  u32 enable_off_mode;
> +static u32 enable_oswr_mode;
>  
>  #ifdef CONFIG_DEBUG_FS
>  #include <linux/debugfs.h>
> @@ -247,10 +248,13 @@ static int option_set(void *data, u64 val)
>  			omap_pm_enable_off_mode();
>  		else
>  			omap_pm_disable_off_mode();
> -		if (cpu_is_omap34xx())
> -			omap3_pm_off_mode_enable(val);
> +
> +		omap3_pm_off_mode_enable(val);
>  	}
>  
> +	if (option == &enable_oswr_mode)
> +		omap4_pm_oswr_mode_enable(val);
> +
>  	return 0;
>  }
>  
> @@ -274,8 +278,16 @@ static int __init pm_dbg_init(void)
>  
>  	pwrdm_for_each(pwrdms_setup, (void *)d);
>  
> -	(void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
> -				   &enable_off_mode, &pm_dbg_option_fops);
> +	if (cpu_is_omap34xx())
> +		(void) debugfs_create_file("enable_off_mode",
> +			S_IRUGO | S_IWUSR, d, &enable_off_mode,
> +			&pm_dbg_option_fops);
> +
> +	if (cpu_is_omap44xx())
> +		(void) debugfs_create_file("enable_oswr_mode",
> +			S_IRUGO | S_IWUSR, d, &enable_oswr_mode,
> +			&pm_dbg_option_fops);
> +
>  	pm_dbg_init_done = 1;
>  
>  	return 0;
> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
> index 36fa90b..c36ab63 100644
> --- a/arch/arm/mach-omap2/pm.h
> +++ b/arch/arm/mach-omap2/pm.h
> @@ -17,6 +17,7 @@
>  
>  extern void *omap3_secure_ram_storage;
>  extern void omap3_pm_off_mode_enable(int);
> +extern void omap4_pm_oswr_mode_enable(int);
>  extern void omap_sram_idle(void);
>  extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state);
>  extern int omap3_idle_init(void);
> diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
> index cc85576..07ac0d3 100644
> --- a/arch/arm/mach-omap2/pm44xx.c
> +++ b/arch/arm/mach-omap2/pm44xx.c
> @@ -115,6 +115,22 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
>  	return omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);
>  }
>  
> +void omap4_pm_oswr_mode_enable(int enable)
> +{
> +	u32 next_logic_state;
> +	struct power_state *pwrst;
> +
> +	if (enable)
> +		next_logic_state = PWRDM_POWER_OFF;
> +	else
> +		next_logic_state = PWRDM_POWER_RET;
> +
> +	list_for_each_entry(pwrst, &pwrst_list, node) {
> +		pwrst->next_logic_state = next_logic_state;
> +		pwrdm_set_logic_retst(pwrst->pwrdm, pwrst->next_logic_state);
> +	}
> +}
> +
>  /**
>   * omap_default_idle - OMAP4 default ilde routine.'
>   *

  reply	other threads:[~2012-05-15 22:41 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-14 10:03 [PATCHv5 0/8] ARM: OMAP4: core retention support Tero Kristo
2012-05-14 10:03 ` Tero Kristo
2012-05-14 10:03 ` [PATCHv5 1/8] ARM: OMAP4: suspend: Program all domains to retention Tero Kristo
2012-05-14 10:03   ` Tero Kristo
2012-05-15 19:52   ` Kevin Hilman
2012-05-15 19:52     ` Kevin Hilman
2012-05-16  8:37     ` Tero Kristo
2012-05-16  8:37       ` Tero Kristo
2012-05-14 10:03 ` [PATCHv5 2/8] TEMP: ARM: OMAP4: hwmod_data: Do not get DSP out of reset at boot time Tero Kristo
2012-05-14 10:03   ` Tero Kristo
2012-05-14 10:03 ` [PATCHv5 3/8] ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX gic control register change Tero Kristo
2012-05-14 10:03   ` Tero Kristo
2012-05-15 21:44   ` Kevin Hilman
2012-05-15 21:44     ` Kevin Hilman
2012-05-16  8:54     ` Tero Kristo
2012-05-16  8:54       ` Tero Kristo
2012-05-16  9:16     ` Santosh Shilimkar
2012-05-16  9:16       ` Santosh Shilimkar
2012-05-16 12:23       ` Santosh Shilimkar
2012-05-16 12:23         ` Santosh Shilimkar
2012-05-16 16:51         ` Kevin Hilman
2012-05-16 16:51           ` Kevin Hilman
2012-05-17  6:46           ` Shilimkar, Santosh
2012-05-17  6:46             ` Shilimkar, Santosh
2012-05-17 17:15             ` Kevin Hilman
2012-05-17 17:15               ` Kevin Hilman
2012-05-18  6:05               ` Shilimkar, Santosh
2012-05-18  6:05                 ` Shilimkar, Santosh
2012-05-18 14:13                 ` Kevin Hilman
2012-05-18 14:13                   ` Kevin Hilman
2012-05-16 12:31   ` Santosh Shilimkar
2012-05-16 12:31     ` Santosh Shilimkar
2012-05-14 10:03 ` [PATCHv5 4/8] ARM: OMAP4: hwmod: flag hwmods/modules supporting module level context status Tero Kristo
2012-05-14 10:03   ` Tero Kristo
2012-05-14 10:03 ` [PATCHv5 5/8] ARM: OMAP: hwmod: Add support for per hwmod/module context lost count Tero Kristo
2012-05-14 10:03   ` Tero Kristo
2012-05-29 19:32   ` Menon, Nishanth
2012-05-29 19:32     ` Menon, Nishanth
2012-05-30  8:02     ` Tero Kristo
2012-05-30  8:02       ` Tero Kristo
2012-05-14 10:03 ` [PATCHv5 6/8] ARM: OMAP4: pwrdm: add support for reading prev logic and mem states Tero Kristo
2012-05-14 10:03   ` Tero Kristo
2012-05-15 22:36   ` Kevin Hilman
2012-05-15 22:36     ` Kevin Hilman
2012-05-16  8:55     ` Tero Kristo
2012-05-16  8:55       ` Tero Kristo
2012-05-14 10:03 ` [PATCHv5 7/8] ARM: OMAP4: PM: Add next_logic_state param to power_state Tero Kristo
2012-05-14 10:03   ` Tero Kristo
2012-05-14 10:03 ` [PATCHv5 8/8] ARM: OMAP4: PM: Added option for enabling OSWR Tero Kristo
2012-05-14 10:03   ` Tero Kristo
2012-05-15 22:41   ` Kevin Hilman [this message]
2012-05-15 22:41     ` Kevin Hilman
2012-05-16  9:10     ` Tero Kristo
2012-05-16  9:10       ` Tero Kristo
2012-05-16 18:03       ` Kevin Hilman
2012-05-16 18:03         ` Kevin Hilman

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=87zk999ie4.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=t-kristo@ti.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.