From: Tony Lindgren <tony@atomide.com>
To: "Govindraj.R" <govindraj.raja@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Tero Kristo <t-kristo@ti.com>, Paul Walmsley <paul@pwsan.com>,
Kevin Hilman <khilman@ti.com>, Benoit Cousson <b-cousson@ti.com>,
Rajendra Nayak <rnayak@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: Re: [PATCH v3 1/2] ARM: OMAP2+: omap_hwmod: Add api to enable/disable module level wakeup events
Date: Tue, 24 Apr 2012 09:07:40 -0700 [thread overview]
Message-ID: <20120424160740.GJ3739@atomide.com> (raw)
In-Reply-To: <1335276552-24340-2-git-send-email-govindraj.raja@ti.com>
* Govindraj.R <govindraj.raja@ti.com> [120424 07:12]:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> On 24xx/34xx/36xx Module level wakeup events are enabled/disabled using
> PM_WKEN1_CORE/PM_WKEN_PER regs.
>
> Add api to control the module level wakeup mechanism from info provided from
> hwmod data.
>
> omap_hwmod_enable/disable_wakeup is used from serial.c which should
> configure PM_WKEN register to enable or disable the module level wakeup.
>
> Cc: Tero Kristo <t-kristo@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Benoit Cousson <b-cousson@ti.com>
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
> ---
> arch/arm/mach-omap2/omap_hwmod.c | 22 ++++++++++++++++++++++
> arch/arm/mach-omap2/prm2xxx_3xxx.c | 16 ++++++++++++++++
> arch/arm/mach-omap2/prm2xxx_3xxx.h | 9 +++++++++
> 3 files changed, 47 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 2c27fdb..4f10619 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -382,6 +382,26 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
> }
>
> /**
> + * _enable_module_level_wakeup - enable/disable module level wakeup on hwmod.
> + * @oh: struct omap_hwmod *
> + * @set_wake: bool value indicating to set (true) or clear (false) module level
> + * wakeup enable
> + *
> + * Set or clear the module level wakeup capability the
> + * hwmod @oh. This function configures th PM_WKEN reg bits if they
> + * are available from hwmod. No return value
> + */
> +static void _enable_module_level_wakeup(struct omap_hwmod *oh, bool set_wake)
> +{
> + if (cpu_is_omap24xx() || cpu_is_omap34xx())
> + omap2_prm_enable_prcm_module_wakeup(
> + oh->prcm.omap2.module_offs,
> + oh->prcm.omap2.prcm_reg_id,
> + oh->prcm.omap2.idlest_idle_bit,
> + set_wake);
> +}
Please don't sprinkle cpu_is_omap tests into code that gets called multiple times.
Initialize things properly during init instead.
Regards,
Tony
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] ARM: OMAP2+: omap_hwmod: Add api to enable/disable module level wakeup events
Date: Tue, 24 Apr 2012 09:07:40 -0700 [thread overview]
Message-ID: <20120424160740.GJ3739@atomide.com> (raw)
In-Reply-To: <1335276552-24340-2-git-send-email-govindraj.raja@ti.com>
* Govindraj.R <govindraj.raja@ti.com> [120424 07:12]:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> On 24xx/34xx/36xx Module level wakeup events are enabled/disabled using
> PM_WKEN1_CORE/PM_WKEN_PER regs.
>
> Add api to control the module level wakeup mechanism from info provided from
> hwmod data.
>
> omap_hwmod_enable/disable_wakeup is used from serial.c which should
> configure PM_WKEN register to enable or disable the module level wakeup.
>
> Cc: Tero Kristo <t-kristo@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Benoit Cousson <b-cousson@ti.com>
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
> ---
> arch/arm/mach-omap2/omap_hwmod.c | 22 ++++++++++++++++++++++
> arch/arm/mach-omap2/prm2xxx_3xxx.c | 16 ++++++++++++++++
> arch/arm/mach-omap2/prm2xxx_3xxx.h | 9 +++++++++
> 3 files changed, 47 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 2c27fdb..4f10619 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -382,6 +382,26 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
> }
>
> /**
> + * _enable_module_level_wakeup - enable/disable module level wakeup on hwmod.
> + * @oh: struct omap_hwmod *
> + * @set_wake: bool value indicating to set (true) or clear (false) module level
> + * wakeup enable
> + *
> + * Set or clear the module level wakeup capability the
> + * hwmod @oh. This function configures th PM_WKEN reg bits if they
> + * are available from hwmod. No return value
> + */
> +static void _enable_module_level_wakeup(struct omap_hwmod *oh, bool set_wake)
> +{
> + if (cpu_is_omap24xx() || cpu_is_omap34xx())
> + omap2_prm_enable_prcm_module_wakeup(
> + oh->prcm.omap2.module_offs,
> + oh->prcm.omap2.prcm_reg_id,
> + oh->prcm.omap2.idlest_idle_bit,
> + set_wake);
> +}
Please don't sprinkle cpu_is_omap tests into code that gets called multiple times.
Initialize things properly during init instead.
Regards,
Tony
next prev parent reply other threads:[~2012-04-24 16:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 14:09 [PATCH v3 0/2] ARM: omap_hwmod: add api to enable/disable module level wakeup Govindraj.R
2012-04-24 14:09 ` Govindraj.R
2012-04-24 14:09 ` [PATCH v3 1/2] ARM: OMAP2+: omap_hwmod: Add api to enable/disable module level wakeup events Govindraj.R
2012-04-24 14:09 ` Govindraj.R
2012-04-24 16:07 ` Tony Lindgren [this message]
2012-04-24 16:07 ` Tony Lindgren
2012-04-24 14:09 ` [PATCH v3 2/2] ARM: omap3: pm: Remove uart module level wakeup configurations Govindraj.R
2012-04-24 14:09 ` Govindraj.R
2012-04-25 7:17 ` [PATCH 1/2 v4] ARM: OMAP2+: omap_hwmod: Add api to enable/disable module level wakeup events Govindraj.R
2012-04-25 7:17 ` Govindraj.R
2012-05-07 18:12 ` Kevin Hilman
2012-05-07 18:12 ` Kevin Hilman
2012-06-01 9:29 ` Menon, Nishanth
2012-06-01 9:29 ` Menon, Nishanth
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=20120424160740.GJ3739@atomide.com \
--to=tony@atomide.com \
--cc=b-cousson@ti.com \
--cc=govindraj.raja@ti.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=t-kristo@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.