RE: [PATCH] Enable SYSOFFMODE use

2008-08-07 Thread Kalle Jokiniemi
On ke, 2008-08-06 at 12:12 -0500, ext Woodruff, Richard wrote:
  I would say no, we don't need the CONFIG_SYSOFFMODE option.
 
 One point is if you try an go to 0v on something under and ES2.1 you
 will end up with crashes after a while.  Some kind of conditional is
 needed unless we get to drop the non-production chip versions.

OK. We can replace the macros with run-time checks. But for ES2.1
suspending to 0V should be safe, right?

 
 Before ES2.1 there is a ROM code bug which will trip up the context
 restore.

So ES2.0 is also affected, good to know.

 
 Really, it would be good to schedule some time to kill ES1 support.
 The chip is so different its really just baggage.  With cheap and
 available OMAP3's out there they are really not viable.

I've got ES2.0, so no objections from me. Anyone want to confess still
using ES1.0? Tony, what do you think?

 
 As to C state, I'm not sure, just yet.  If we end up with too many of
 them there is some overhead in determining thresholds, then trying to
 tweak a governor to choose them smartly?  It's a little while before
 this code get to that point, but the process seem to be a bit time
 consuming on internal.

OK, so I think we go with the user selectable sysoff_while_idle sysfs
interface and not mess up the C-states. I see Rajendra posted a
refreshed set of patches, so maybe we'll have the C-states in mainline
soon.

regards,
Kalle

 
 Regards,
 Richard W.
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap
 in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] Enable SYSOFFMODE use

2008-08-07 Thread Woodruff, Richard
 On ke, 2008-08-06 at 12:12 -0500, ext Woodruff, Richard wrote:
   I would say no, we don't need the CONFIG_SYSOFFMODE option.
 
  One point is if you try an go to 0v on something under and ES2.1 you
  will end up with crashes after a while.  Some kind of conditional is
  needed unless we get to drop the non-production chip versions.

 OK. We can replace the macros with run-time checks. But for ES2.1
 suspending to 0V should be safe, right?

It has been ok in our tests so far.

Regards,
Richard W.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Enable SYSOFFMODE use

2008-08-06 Thread Kalle Jokiniemi
On ti, 2008-08-05 at 13:50 +0300, ext Tony Lindgren wrote:
 * Peter 'p2' De Schrijver [EMAIL PROTECTED] [080721 19:03]:
  
  Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
  ---
   arch/arm/mach-omap2/smartreflex.c |   10 +-
   1 files changed, 5 insertions(+), 5 deletions(-)
  
  diff --git a/arch/arm/mach-omap2/smartreflex.c 
  b/arch/arm/mach-omap2/smartreflex.c
  index 0f3a659..b41fe96 100644
  --- a/arch/arm/mach-omap2/smartreflex.c
  +++ b/arch/arm/mach-omap2/smartreflex.c
  @@ -396,17 +396,17 @@ static void sr_configure_vc(void)
   
  /* Setup voltctrl and other setup times */
  /* XXX CONFIG_SYSOFFMODE has not been implemented yet */
  -#ifdef CONFIG_SYSOFFMODE
  -   prm_write_mod_reg(OMAP3430_AUTO_OFF | OMAP3430_AUTO_RET,
  -   OMAP3430_GR_MOD,
  +#ifdef CONFIG_OMAP_SYSOFFMODE
  +   prm_write_mod_reg(OMAP3430_AUTO_OFF | OMAP3430_AUTO_RET |
  +   OMAP3430_SEL_OFF, OMAP3430_GR_MOD,
  OMAP3_PRM_VOLTCTRL_OFFSET);
   
  prm_write_mod_reg(OMAP3430_CLKSETUP_DURATION, OMAP3430_GR_MOD,
  OMAP3_PRM_CLKSETUP_OFFSET);
  prm_write_mod_reg((OMAP3430_VOLTSETUP_TIME2 
  -   OMAP3430_VOLTSETUP_TIME2_OFFSET) |
  +   OMAP3430_SETUP_TIME2_SHIFT) |
  (OMAP3430_VOLTSETUP_TIME1 
  -   OMAP3430_VOLTSETUP_TIME1_OFFSET),
  +   OMAP3430_SETUP_TIME1_SHIFT),
  OMAP3430_GR_MOD, OMAP3_PRM_VOLTSETUP1_OFFSET);
   
  prm_write_mod_reg(OMAP3430_VOLTOFFSET_DURATION, OMAP3430_GR_MOD,
 
 Do we need the CONFIG_SYSOFFMODE option? How about just add
 /sys/power/off_while_idle and if that's set to 1 then allow off mode?

I would say no, we don't need the CONFIG_SYSOFFMODE option.

I think we can always use 0 volt sys off mode for suspend, since it's
user activated and the wake-up latency is still in range of only few ms.

Dynamic idle is bit different, because the system would have to be idle
a lot longer for the 0V off mode to pay off (when comparing to sleep
voltage off mode). We could have an extra C-state in the upcoming
cpu-idle driver for 0 volt off-mode. Richard, Rajendra, any thoughts?

If that's not feasible, the off_while_idle sysfs interface can be
created. 

Br,
Kalle


 
 Tony
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Enable SYSOFFMODE use

2008-08-05 Thread Tony Lindgren
* Peter 'p2' De Schrijver [EMAIL PROTECTED] [080721 19:03]:
 
 Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
 ---
  arch/arm/mach-omap2/smartreflex.c |   10 +-
  1 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/smartreflex.c 
 b/arch/arm/mach-omap2/smartreflex.c
 index 0f3a659..b41fe96 100644
 --- a/arch/arm/mach-omap2/smartreflex.c
 +++ b/arch/arm/mach-omap2/smartreflex.c
 @@ -396,17 +396,17 @@ static void sr_configure_vc(void)
  
   /* Setup voltctrl and other setup times */
   /* XXX CONFIG_SYSOFFMODE has not been implemented yet */
 -#ifdef CONFIG_SYSOFFMODE
 - prm_write_mod_reg(OMAP3430_AUTO_OFF | OMAP3430_AUTO_RET,
 - OMAP3430_GR_MOD,
 +#ifdef CONFIG_OMAP_SYSOFFMODE
 + prm_write_mod_reg(OMAP3430_AUTO_OFF | OMAP3430_AUTO_RET |
 + OMAP3430_SEL_OFF, OMAP3430_GR_MOD,
   OMAP3_PRM_VOLTCTRL_OFFSET);
  
   prm_write_mod_reg(OMAP3430_CLKSETUP_DURATION, OMAP3430_GR_MOD,
   OMAP3_PRM_CLKSETUP_OFFSET);
   prm_write_mod_reg((OMAP3430_VOLTSETUP_TIME2 
 - OMAP3430_VOLTSETUP_TIME2_OFFSET) |
 + OMAP3430_SETUP_TIME2_SHIFT) |
   (OMAP3430_VOLTSETUP_TIME1 
 - OMAP3430_VOLTSETUP_TIME1_OFFSET),
 + OMAP3430_SETUP_TIME1_SHIFT),
   OMAP3430_GR_MOD, OMAP3_PRM_VOLTSETUP1_OFFSET);
  
   prm_write_mod_reg(OMAP3430_VOLTOFFSET_DURATION, OMAP3430_GR_MOD,

Do we need the CONFIG_SYSOFFMODE option? How about just add
/sys/power/off_while_idle and if that's set to 1 then allow off mode?

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html