All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@ti.com>
To: Vaibhav Bedia <vaibhav.bedia@ti.com>
Cc: khilman@ti.com, b-cousson@ti.com, paul@pswan.com,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC][PATCH v2 1/1] ARM: OMAP2+: PM: Register suspend ops even in the presence of DT blob
Date: Fri, 20 Jul 2012 10:09:43 +0530	[thread overview]
Message-ID: <5008E10F.4080706@ti.com> (raw)
In-Reply-To: <1342699728-19831-1-git-send-email-vaibhav.bedia@ti.com>

On Thursday 19 July 2012 05:38 PM, Vaibhav Bedia wrote:
> As per the comment in omap2_common_late_init() looks like the
> original intent of the DT check was to treat only the PMIC
> and SR initialization differently. Recent changes to consolidate
> the suspend-resume code across OMAP3/4 resulted into the
> registration of suspend ops also being dependent on the check
> for DT blob. Since the suspend-resume operation should not
> really be dependent on the usage of DT remove this dependency
> by wrapping the PMIC and SR init under the DT check.

So I am guessing you also tested suspend/resume on your hardware
with this patch, when booting with a DT blob, and it passed.

>
> Signed-off-by: Vaibhav Bedia<vaibhav.bedia@ti.com>
> ---
> v2->v1
>   - As suggested by Paul, Instead of moving around the suspend ops
>     registration just wrap the PMIC and SR init under the DT check.
>   - Fixed up Kevin's email address :\
>
>   arch/arm/mach-omap2/pm.c |   21 ++++++++++-----------
>   1 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 9cb5ced..46848f7 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -302,19 +302,18 @@ int __init omap2_common_pm_late_init(void)
>   	 * a completely different mechanism.
>   	 * Disable this part if a DT blob is available.
>   	 */
> -	if (of_have_populated_dt())
> -		return 0;
> +	if (!of_have_populated_dt()) {
> +		/* Init the voltage layer */
> +		omap_pmic_late_init();
> +		omap_voltage_late_init();
>
> -	/* Init the voltage layer */
> -	omap_pmic_late_init();
> -	omap_voltage_late_init();
> +		/* Initialize the voltages */
> +		omap3_init_voltages();
> +		omap4_init_voltages();
>
> -	/* Initialize the voltages */
> -	omap3_init_voltages();
> -	omap4_init_voltages();
> -
> -	/* Smartreflex device init */
> -	omap_devinit_smartreflex();
> +		/* Smartreflex device init */
> +		omap_devinit_smartreflex();
> +	}
>
>   #ifdef CONFIG_SUSPEND
>   	suspend_set_ops(&omap_pm_ops);


WARNING: multiple messages have this Message-ID (diff)
From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC][PATCH v2 1/1] ARM: OMAP2+: PM: Register suspend ops even in the presence of DT blob
Date: Fri, 20 Jul 2012 10:09:43 +0530	[thread overview]
Message-ID: <5008E10F.4080706@ti.com> (raw)
In-Reply-To: <1342699728-19831-1-git-send-email-vaibhav.bedia@ti.com>

On Thursday 19 July 2012 05:38 PM, Vaibhav Bedia wrote:
> As per the comment in omap2_common_late_init() looks like the
> original intent of the DT check was to treat only the PMIC
> and SR initialization differently. Recent changes to consolidate
> the suspend-resume code across OMAP3/4 resulted into the
> registration of suspend ops also being dependent on the check
> for DT blob. Since the suspend-resume operation should not
> really be dependent on the usage of DT remove this dependency
> by wrapping the PMIC and SR init under the DT check.

So I am guessing you also tested suspend/resume on your hardware
with this patch, when booting with a DT blob, and it passed.

>
> Signed-off-by: Vaibhav Bedia<vaibhav.bedia@ti.com>
> ---
> v2->v1
>   - As suggested by Paul, Instead of moving around the suspend ops
>     registration just wrap the PMIC and SR init under the DT check.
>   - Fixed up Kevin's email address :\
>
>   arch/arm/mach-omap2/pm.c |   21 ++++++++++-----------
>   1 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 9cb5ced..46848f7 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -302,19 +302,18 @@ int __init omap2_common_pm_late_init(void)
>   	 * a completely different mechanism.
>   	 * Disable this part if a DT blob is available.
>   	 */
> -	if (of_have_populated_dt())
> -		return 0;
> +	if (!of_have_populated_dt()) {
> +		/* Init the voltage layer */
> +		omap_pmic_late_init();
> +		omap_voltage_late_init();
>
> -	/* Init the voltage layer */
> -	omap_pmic_late_init();
> -	omap_voltage_late_init();
> +		/* Initialize the voltages */
> +		omap3_init_voltages();
> +		omap4_init_voltages();
>
> -	/* Initialize the voltages */
> -	omap3_init_voltages();
> -	omap4_init_voltages();
> -
> -	/* Smartreflex device init */
> -	omap_devinit_smartreflex();
> +		/* Smartreflex device init */
> +		omap_devinit_smartreflex();
> +	}
>
>   #ifdef CONFIG_SUSPEND
>   	suspend_set_ops(&omap_pm_ops);

  reply	other threads:[~2012-07-20  4:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 12:08 [RFC][PATCH v2 1/1] ARM: OMAP2+: PM: Register suspend ops even in the presence of DT blob Vaibhav Bedia
2012-07-19 12:08 ` Vaibhav Bedia
2012-07-20  4:39 ` Rajendra Nayak [this message]
2012-07-20  4:39   ` Rajendra Nayak
2012-07-20  5:01   ` Bedia, Vaibhav
2012-07-20  5:01     ` Bedia, Vaibhav
2012-07-20  5:12     ` Rajendra Nayak
2012-07-20  5:12       ` Rajendra Nayak
2012-07-20  5:43       ` Bedia, Vaibhav
2012-07-20  5:43         ` Bedia, Vaibhav

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=5008E10F.4080706@ti.com \
    --to=rnayak@ti.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pswan.com \
    --cc=vaibhav.bedia@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.