All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: "Gulati, Shweta" <shweta.gulati@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Sripathy, Vishwanath" <vishwanath.bs@ti.com>
Subject: Re: [PATCHv2 1/2]OMAP3: PM: To put all the powerdomains in OFF mode instead of Ret
Date: Fri, 14 May 2010 05:10:43 -0500	[thread overview]
Message-ID: <4BED21A3.3060704@ti.com> (raw)
In-Reply-To: <1273830555-19750-1-git-send-email-shweta.gulati@ti.com>

Gulati, Shweta had written, on 05/14/2010 04:49 AM, the following:
> From: Shweta Gulati <shweta.gulati@ti.com>
> 
> According to Defect OMAPS00210499 CAM, DSS and USBHOST should stay
                       ^^^^^^^^^^^^^ <- I dont think the community knows 
anything or cares about OMAPS numbers..?

> in OFF state instead of Retention in OS Idle Path.
> This Patch puts all the powerdomain in OFF state by default 
> in pm init code and ensures that Mpu next state is OFF only
> before it goes to Suspend/Idle and RET initiallly as that 
> could have caused system to hang if ROM code issues WFI.  
> 
> Signed-off-by: Vishwanath BS <Vishwanath.bs@ti.com>
> Signed-off-by: Shweta Gulati <shweta.gulati@ti.com>
> ---
> 
> 
Could I request you to switch to using git and git-format-patches?
it is much easier to see with a diffstat section what files got hit.

might be a good idea reading this before posting:
http://omapedia.org/wiki/Releasing_to_Linux_kernel_using_patches_and_emails

> Index: kernel-omap3/arch/arm/mach-omap2/cpuidle34xx.c
> ===================================================================
> --- kernel-omap3.orig/arch/arm/mach-omap2/cpuidle34xx.c
> +++ kernel-omap3/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -144,7 +144,7 @@ static int omap3_enter_idle(struct cpuid
>  	local_irq_disable();
>  	local_fiq_disable();
>  
> -	if (!enable_off_mode) {
> +	if (disable_off_mode) {
why? your subject makes no reference to change in variable usage... 
!enable_off_mode is pretty readable for folks who know C.


>  		if (mpu_state < PWRDM_POWER_RET)
>  			mpu_state = PWRDM_POWER_RET;
>  		if (core_state < PWRDM_POWER_RET)
> Index: kernel-omap3/arch/arm/mach-omap2/pm-debug.c
> ===================================================================
> --- kernel-omap3.orig/arch/arm/mach-omap2/pm-debug.c
> +++ kernel-omap3/arch/arm/mach-omap2/pm-debug.c
> @@ -548,7 +548,7 @@ static int option_set(void *data, u64 va
>  
>  	*option = val;
>  
> -	if (option == &enable_off_mode)
> +	if (option == &disable_off_mode)
>  		omap3_pm_off_mode_enable(val);
>  	return 0;
>  }
> @@ -597,8 +597,8 @@ static int __init pm_dbg_init(void)
>  
>  		}
>  
> -	(void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUGO, d,
> -				   &enable_off_mode, &pm_dbg_option_fops);
> +	(void) debugfs_create_file("disable_off_mode", S_IRUGO | S_IWUGO, d,
> +				   &disable_off_mode, &pm_dbg_option_fops);

this patch does a hell lot more than the claim -> does even a debugfs 
change..

>  	(void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUGO, d,
>  				   &sleep_while_idle, &pm_dbg_option_fops);
>  	(void) debugfs_create_file("enable_oswr", S_IRUGO | S_IWUGO, d,
> Index: kernel-omap3/arch/arm/mach-omap2/pm.h
> ===================================================================
> --- kernel-omap3.orig/arch/arm/mach-omap2/pm.h
> +++ kernel-omap3/arch/arm/mach-omap2/pm.h
> @@ -13,7 +13,7 @@
>  
>  #include <plat/powerdomain.h>
>  
> -extern u32 enable_off_mode;
> +extern u32 disable_off_mode;
>  extern u32 sleep_while_idle;
>  extern u32 enable_oswr;
>  extern u32 voltage_off_while_idle;
> Index: kernel-omap3/arch/arm/mach-omap2/pm34xx.c
> ===================================================================
> --- kernel-omap3.orig/arch/arm/mach-omap2/pm34xx.c
> +++ kernel-omap3/arch/arm/mach-omap2/pm34xx.c
> @@ -74,7 +74,7 @@ static inline bool is_suspending(void)
>  #define OMAP3630_EFUSE_CNTRL		0x48002A8C
>  #define ABO_LDO_TRANXDONE_TIMEOUT	100
>  
> -u32 enable_off_mode;
> +u32 disable_off_mode;
>  u32 sleep_while_idle;
>  u32 enable_oswr;
>  u32 wakeup_timer_seconds;
> @@ -811,6 +811,14 @@ static int omap3_pm_suspend(void)
>  				goto restore;
>  		}
>  	}
> +	if (!disable_off_mode) {
> +		list_for_each_entry(pwrst, &pwrst_list, node) {
> +			if (!strcmp("mpu_pwrdm", pwrst->pwrdm->name) ||
> +				!strcmp("core_pwrdm", pwrst->pwrdm->name))
> +				pwrdm_set_next_pwrst(pwrst->pwrdm,
> +							PWRDM_POWER_OFF);
> +		}
> +	}
>  	omap_uart_prepare_suspend();
>  	omap3_intc_suspend();
>  
> @@ -1193,15 +1201,15 @@ static void __init prcm_setup_regs(void)
>  	omap3_d2d_idle();
>  }
>  
> -void omap3_pm_off_mode_enable(int enable)
> +void omap3_pm_off_mode_enable(int disable)
>  {
>  	struct power_state *pwrst;
>  	u32 state;
>  
> -	if (enable)
> -		state = PWRDM_POWER_OFF;
> -	else
> +	if (disable)
>  		state = PWRDM_POWER_RET;
> +	else
> +		state = PWRDM_POWER_OFF;
>  
>  #ifdef CONFIG_OMAP_PM_SRF
>  	resource_lock_opp(VDD1_OPP);
> @@ -1308,7 +1316,8 @@ static int __init pwrdms_setup(struct po
>  	if (!pwrst)
>  		return -ENOMEM;
>  	pwrst->pwrdm = pwrdm;
> -	if (strcmp("iva2_pwrdm", pwrdm->name))
> +	if (!strcmp("mpu_pwrdm", pwrdm->name) ||
> +		!strcmp("core_pwrdm", pwrdm->name))
>  		pwrst->next_state = PWRDM_POWER_RET;
>  	else
>  		 pwrst->next_state = PWRDM_POWER_OFF;
> Index: kernel-omap3/arch/arm/mach-omap2/resource34xx.c
> ===================================================================
> --- kernel-omap3.orig/arch/arm/mach-omap2/resource34xx.c
> +++ kernel-omap3/arch/arm/mach-omap2/resource34xx.c
> @@ -109,7 +109,7 @@ void init_pd_latency(struct shared_resou
>  	struct pd_latency_db *pd_lat_db;
>  
>  	resp->no_of_users = 0;
> -	if (enable_off_mode)
> +	if (!disable_off_mode)
>  		resp->curr_level = PD_LATENCY_OFF;
>  	else
>  		resp->curr_level = PD_LATENCY_RET;
> @@ -147,7 +147,7 @@ int set_pd_latency(struct shared_resourc
>  		}
>  	}
>  
> -	if (!enable_off_mode && pd_lat_level == PD_LATENCY_OFF)
> +	if (disable_off_mode && pd_lat_level == PD_LATENCY_OFF)
>  		pd_lat_level = PD_LATENCY_RET;
>  
>  	resp->curr_level = pd_lat_level;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Regards,
Nishanth Menon

  reply	other threads:[~2010-05-14 10:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14  9:49 [PATCHv2 1/2]OMAP3: PM: To put all the powerdomains in OFF mode instead of Ret shweta gulati
2010-05-14 10:10 ` Nishanth Menon [this message]
2010-05-14 17:04 ` 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=4BED21A3.3060704@ti.com \
    --to=nm@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=shweta.gulati@ti.com \
    --cc=vishwanath.bs@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.