Re: [PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

2014-05-20 Thread Lee Jones
On Tue, 13 May 2014, Tony Lindgren wrote:

 Looks like we can still hit the issue of wrong load order of
 twl4030 configuration. If we have a sleep configuration loaded,
 and do a warm reset, the device can hang while initializing the
 wakeup12 sequence. We do have a warning message about wrong order
 of twl4030 configuration, but in this case it does not help as
 the sleep configuration was loaded during the previous boot and
 the state of twl4030 is maintained throughout the warm reset.
 
 Fix the issue by clearing any existing sleep configuration
 before we load the warm reset configuration.
 
 Cc: Peter Ujfalusi peter.ujfal...@ti.com
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  drivers/mfd/twl4030-power.c | 6 ++
  1 file changed, 6 insertions(+)

Can't vouch for the semantics of the patch, but the code looks good.

  Acked-by: Lee Jones lee.jo...@linaro.org

Can I just apply this, or would you like Peter to review it first?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

2014-05-20 Thread Tony Lindgren
* Lee Jones lee.jo...@linaro.org [140520 08:02]:
 On Tue, 13 May 2014, Tony Lindgren wrote:
 
  Looks like we can still hit the issue of wrong load order of
  twl4030 configuration. If we have a sleep configuration loaded,
  and do a warm reset, the device can hang while initializing the
  wakeup12 sequence. We do have a warning message about wrong order
  of twl4030 configuration, but in this case it does not help as
  the sleep configuration was loaded during the previous boot and
  the state of twl4030 is maintained throughout the warm reset.
  
  Fix the issue by clearing any existing sleep configuration
  before we load the warm reset configuration.
  
  Cc: Peter Ujfalusi peter.ujfal...@ti.com
  Signed-off-by: Tony Lindgren t...@atomide.com
  ---
   drivers/mfd/twl4030-power.c | 6 ++
   1 file changed, 6 insertions(+)
 
 Can't vouch for the semantics of the patch, but the code looks good.
 
   Acked-by: Lee Jones lee.jo...@linaro.org
 
 Can I just apply this, or would you like Peter to review it first?

As far as I'm concerned you can go ahead an apply, it's been
floating on the list for a while and Peter is probably busy
with other things.

Regards,

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


Re: [PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

2014-05-20 Thread Lee Jones
   Looks like we can still hit the issue of wrong load order of
   twl4030 configuration. If we have a sleep configuration loaded,
   and do a warm reset, the device can hang while initializing the
   wakeup12 sequence. We do have a warning message about wrong order
   of twl4030 configuration, but in this case it does not help as
   the sleep configuration was loaded during the previous boot and
   the state of twl4030 is maintained throughout the warm reset.
   
   Fix the issue by clearing any existing sleep configuration
   before we load the warm reset configuration.
   
   Cc: Peter Ujfalusi peter.ujfal...@ti.com
   Signed-off-by: Tony Lindgren t...@atomide.com
   ---
drivers/mfd/twl4030-power.c | 6 ++
1 file changed, 6 insertions(+)
  
  Can't vouch for the semantics of the patch, but the code looks good.
  
Acked-by: Lee Jones lee.jo...@linaro.org
  
  Can I just apply this, or would you like Peter to review it first?
 
 As far as I'm concerned you can go ahead an apply, it's been
 floating on the list for a while and Peter is probably busy
 with other things.

No problem.  Just a couple of things for you to look at in the other
patches, then we can go ahead and apply for v3.16.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

2014-05-20 Thread Tony Lindgren
* Lee Jones lee.jo...@linaro.org [140520 10:38]:
Looks like we can still hit the issue of wrong load order of
twl4030 configuration. If we have a sleep configuration loaded,
and do a warm reset, the device can hang while initializing the
wakeup12 sequence. We do have a warning message about wrong order
of twl4030 configuration, but in this case it does not help as
the sleep configuration was loaded during the previous boot and
the state of twl4030 is maintained throughout the warm reset.

Fix the issue by clearing any existing sleep configuration
before we load the warm reset configuration.

Cc: Peter Ujfalusi peter.ujfal...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 drivers/mfd/twl4030-power.c | 6 ++
 1 file changed, 6 insertions(+)
   
   Can't vouch for the semantics of the patch, but the code looks good.
   
 Acked-by: Lee Jones lee.jo...@linaro.org
   
   Can I just apply this, or would you like Peter to review it first?
  
  As far as I'm concerned you can go ahead an apply, it's been
  floating on the list for a while and Peter is probably busy
  with other things.
 
 No problem.  Just a couple of things for you to look at in the other
 patches, then we can go ahead and apply for v3.16.

OK thanks yeah saw those. Will fix them up and test today. Then
maybe you can apply them to the immutable branch we set earlier
or I can send you a pull request against that branch whichever
you prefer.

Regards,

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


Re: [PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

2014-05-20 Thread Lee Jones
 Looks like we can still hit the issue of wrong load order of
 twl4030 configuration. If we have a sleep configuration loaded,
 and do a warm reset, the device can hang while initializing the
 wakeup12 sequence. We do have a warning message about wrong order
 of twl4030 configuration, but in this case it does not help as
 the sleep configuration was loaded during the previous boot and
 the state of twl4030 is maintained throughout the warm reset.
 
 Fix the issue by clearing any existing sleep configuration
 before we load the warm reset configuration.
 
 Cc: Peter Ujfalusi peter.ujfal...@ti.com
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  drivers/mfd/twl4030-power.c | 6 ++
  1 file changed, 6 insertions(+)

Can't vouch for the semantics of the patch, but the code looks good.

  Acked-by: Lee Jones lee.jo...@linaro.org

Can I just apply this, or would you like Peter to review it first?
   
   As far as I'm concerned you can go ahead an apply, it's been
   floating on the list for a while and Peter is probably busy
   with other things.
  
  No problem.  Just a couple of things for you to look at in the other
  patches, then we can go ahead and apply for v3.16.
 
 OK thanks yeah saw those. Will fix them up and test today. Then
 maybe you can apply them to the immutable branch we set earlier
 or I can send you a pull request against that branch whichever
 you prefer.

Probably be easier if I update and re-tag the original one.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

2014-05-13 Thread Tony Lindgren
Looks like we can still hit the issue of wrong load order of
twl4030 configuration. If we have a sleep configuration loaded,
and do a warm reset, the device can hang while initializing the
wakeup12 sequence. We do have a warning message about wrong order
of twl4030 configuration, but in this case it does not help as
the sleep configuration was loaded during the previous boot and
the state of twl4030 is maintained throughout the warm reset.

Fix the issue by clearing any existing sleep configuration
before we load the warm reset configuration.

Cc: Peter Ujfalusi peter.ujfal...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 drivers/mfd/twl4030-power.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 96162b6..1b30d8a 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -421,6 +421,12 @@ static int load_twl4030_script(struct twl4030_script 
*tscript,
goto out;
}
if (tscript-flags  TWL4030_WAKEUP12_SCRIPT) {
+   /* Reset any existing sleep script to avoid hangs on reboot */
+   err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, END_OF_SCRIPT,
+  R_SEQ_ADD_A2S);
+   if (err)
+   goto out;
+
err = twl4030_config_wakeup12_sequence(address);
if (err)
goto out;
-- 
1.8.1.1

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