All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jon-hunter@ti.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: b-cousson@ti.com, paul@pwsan.com, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: OMAP: hwmod: Fix error handling in functions used OMAP4 onwards
Date: Tue, 27 Mar 2012 14:52:49 -0500	[thread overview]
Message-ID: <4F721A91.7000102@ti.com> (raw)
In-Reply-To: <1332842311-12308-1-git-send-email-rnayak@ti.com>

Hi Rajendra,

On 3/27/2012 4:58, Rajendra Nayak wrote:
> Some functions like _omap4_disable_module() and _omap4_wait_target_disable()
> are (will be) used on all OMAPs OMAP4 and beyond which support module level
> control. Fix the error checks in these functions to return if called on
> any platform pre OMAP4 (i.e OMAP2 and OMAP3) instead of checking for
> !cpu_is_omap44xx(). This avoids having to update the error check with a
> '&&  !cpu_is_omap54xx()' when OMAP5 is introduced and possibly similar updates
> when further OMAP generations are added.
>
> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
> ---
>   arch/arm/mach-omap2/omap_hwmod.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 8ac26f2..f2a9afa 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -808,7 +808,7 @@ static void _enable_module(struct omap_hwmod *oh)
>    */
>   static int _omap4_wait_target_disable(struct omap_hwmod *oh)
>   {
> -	if (!cpu_is_omap44xx())
> +	if (cpu_is_omap24xx() || cpu_is_omap34xx())
>   		return 0;

What about omap36xx?

>   	if (!oh)
> @@ -838,7 +838,7 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
>   	int v;
>
>   	/* The module mode does not exist prior OMAP4 */
> -	if (!cpu_is_omap44xx())
> +	if (cpu_is_omap24xx() || cpu_is_omap34xx())
>   		return -EINVAL;

Same here.

>
>   	if (!oh->clkdm || !oh->prcm.omap4.modulemode)

Cheers
Jon

WARNING: multiple messages have this Message-ID (diff)
From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP: hwmod: Fix error handling in functions used OMAP4 onwards
Date: Tue, 27 Mar 2012 14:52:49 -0500	[thread overview]
Message-ID: <4F721A91.7000102@ti.com> (raw)
In-Reply-To: <1332842311-12308-1-git-send-email-rnayak@ti.com>

Hi Rajendra,

On 3/27/2012 4:58, Rajendra Nayak wrote:
> Some functions like _omap4_disable_module() and _omap4_wait_target_disable()
> are (will be) used on all OMAPs OMAP4 and beyond which support module level
> control. Fix the error checks in these functions to return if called on
> any platform pre OMAP4 (i.e OMAP2 and OMAP3) instead of checking for
> !cpu_is_omap44xx(). This avoids having to update the error check with a
> '&&  !cpu_is_omap54xx()' when OMAP5 is introduced and possibly similar updates
> when further OMAP generations are added.
>
> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
> ---
>   arch/arm/mach-omap2/omap_hwmod.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 8ac26f2..f2a9afa 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -808,7 +808,7 @@ static void _enable_module(struct omap_hwmod *oh)
>    */
>   static int _omap4_wait_target_disable(struct omap_hwmod *oh)
>   {
> -	if (!cpu_is_omap44xx())
> +	if (cpu_is_omap24xx() || cpu_is_omap34xx())
>   		return 0;

What about omap36xx?

>   	if (!oh)
> @@ -838,7 +838,7 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
>   	int v;
>
>   	/* The module mode does not exist prior OMAP4 */
> -	if (!cpu_is_omap44xx())
> +	if (cpu_is_omap24xx() || cpu_is_omap34xx())
>   		return -EINVAL;

Same here.

>
>   	if (!oh->clkdm || !oh->prcm.omap4.modulemode)

Cheers
Jon

  reply	other threads:[~2012-03-27 19:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-27  9:58 [PATCH] ARM: OMAP: hwmod: Fix error handling in functions used OMAP4 onwards Rajendra Nayak
2012-03-27  9:58 ` Rajendra Nayak
2012-03-27 19:52 ` Jon Hunter [this message]
2012-03-27 19:52   ` Jon Hunter
2012-03-28  2:39   ` Paul Walmsley
2012-03-28  2:39     ` Paul Walmsley
2012-03-28 16:36     ` Jon Hunter
2012-03-28 16:36       ` Jon Hunter
2012-03-28  6:32 ` Hiremath, Vaibhav
2012-03-28  6:32   ` Hiremath, Vaibhav
2012-03-29  6:12   ` Rajendra Nayak
2012-03-29  6:12     ` Rajendra Nayak
2012-03-29  8:56     ` Hiremath, Vaibhav
2012-03-29  8:56       ` Hiremath, Vaibhav
2012-03-29  9:02       ` Rajendra Nayak
2012-03-29  9:02         ` Rajendra Nayak
2012-03-29  9:14         ` Hiremath, Vaibhav
2012-03-29  9:14           ` Hiremath, Vaibhav
2012-03-29 15:01           ` Jon Hunter
2012-03-29 15:01             ` Jon Hunter
2012-03-29 15:03       ` Jon Hunter
2012-03-29 15:03         ` Jon Hunter
2012-03-30  7:14         ` Hiremath, Vaibhav
2012-03-30  7:14           ` Hiremath, 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=4F721A91.7000102@ti.com \
    --to=jon-hunter@ti.com \
    --cc=b-cousson@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rnayak@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.