linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Mike Turquette <mturquette@gmail.com>
Cc: linux-omap@vger.kernel.org, Mike Turquette <mturquette@ti.com>,
	Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH 2/2] OMAP3: PM: remove TWL4030 A2S script before reboot
Date: Tue, 9 Feb 2010 14:35:29 -0800	[thread overview]
Message-ID: <20100209223529.GK21755@atomide.com> (raw)
In-Reply-To: <1265226207-22971-3-git-send-email-mturquette@ti.com>

Hi,

* Mike Turquette <mturquette@gmail.com> [100203 11:42]:
> Removes TWL4030 sleep script prior to rebooting, only on OMAP3. This is
> necessary since DPLL3 reset causes SYS_OFFMODE pin to go low, resulting
> in the sleep script being executed on TWL4030. This usually results in
> VDD1 & VDD2 voltage collapse while ROM code is executing, followed by an
> MPU Watch Dog reset or worse, an irrecoverable hang.

The first patch is OK is for Samuel, but this needs to be updated
against Paul's clock changes. One comment below too.
 
> Signed-off-by: Mike Turquette <mturquette@ti.com>
> ---
>  arch/arm/mach-omap2/clock34xx.c |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
> index 0d30e53..0d6d1d6 100644
> --- a/arch/arm/mach-omap2/clock34xx.c
> +++ b/arch/arm/mach-omap2/clock34xx.c
> @@ -28,6 +28,7 @@
>  #include <linux/bitops.h>
>  #include <linux/err.h>
>  #include <linux/cpufreq.h>
> +#include <linux/i2c/twl.h>
>  
>  #include <plat/cpu.h>
>  #include <plat/clock.h>
> @@ -311,6 +312,8 @@ struct clk_functions omap2_clk_functions = {
>   */
>  void omap2_clk_prepare_for_reboot(void)
>  {
> +	int err = 0;
> +
>  	/* REVISIT: Not ready for 343x */
>  #if 0
>  	u32 rate;
> @@ -321,6 +324,18 @@ void omap2_clk_prepare_for_reboot(void)
>  	rate = clk_get_rate(sclk);
>  	clk_set_rate(vclk, rate);
>  #endif
> +
> +	/*
> +	 * PRCM on OMAP3 will drive SYS_OFFMODE low during DPLL3 warm reset.
> +	 * This causes Gaia sleep script to execute, usually killing VDD1 and
> +	 * VDD2 while code is running.  WA is to disable the sleep script
> +	 * before warm reset.
> +	 */
> +#ifdef CONFIG_TWL4030_POWER
> +	err = twl4030_remove_script(TWL4030_SLEEP_SCRIPT);
> +	if (err)
> +		pr_err("twl4030: error trying to disable sleep script!\n");
> +#endif

This needs to work in cases where we have multiple companion chips
compiled in. You may have twl4030 support compiled in, but no twl4030
hardware on the board. It needs to be based on I2C detected chips during
init somehow.

In the omap for-next branch we already support booting 2420, 34xx, 36xx
and 4430 with the same kernel binary. So please update accordingly.

Regards,

Tony

  reply	other threads:[~2010-02-09 22:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 19:43 [RFC] OMAP3: PM: disable twl4030 sleep sequence before reboot Mike Turquette
2010-02-03 19:43 ` [PATCH 1/2] MFD: TWL4030: introduce remove_script function Mike Turquette
2010-02-03 19:43   ` [PATCH 2/2] OMAP3: PM: remove TWL4030 A2S script before reboot Mike Turquette
2010-02-09 22:35     ` Tony Lindgren [this message]
2010-07-28  9:41     ` [PATCH] twl4030 reboot workaround Mikko Rapeli
2010-07-28 10:07       ` Gopinath, Thara
2010-07-29  6:07         ` Mikko Rapeli
2010-07-28 10:18       ` Peter 'p2' De Schrijver
2010-07-29  6:06         ` Mikko Rapeli
2010-07-28 15:47       ` Mike Turquette
2010-07-29  6:16         ` Mikko Rapeli
2010-07-29  6:41           ` [PATCH v2] " Mikko Rapeli
2010-07-29 19:10             ` Mike Rapoport
2010-07-30  5:48               ` Mikko Rapeli
2010-07-30  6:35               ` Gopinath, Thara
2010-07-30 18:39                 ` Mike Turquette
2010-07-30 19:11                   ` Gopinath, Thara
2010-08-01  6:31                     ` Mike Rapoport

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=20100209223529.GK21755@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@gmail.com \
    --cc=mturquette@ti.com \
    --cc=paul@pwsan.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).