Re: [PATCH v3 1/2] ARM: OMAP2+: omap_hwmod: Add api to enable/disable module level wakeup events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

* Govindraj.R <govindraj.raja@xxxxxx> [120424 07:12]:
> From: "Govindraj.R" <govindraj.raja@xxxxxx>
> 
> 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@xxxxxx>
> Cc: Tony Lindgren <tony@xxxxxxxxxxx>
> Cc: Paul Walmsley <paul@xxxxxxxxx>
> Cc: Kevin Hilman <khilman@xxxxxx>
> Cc: Benoit Cousson <b-cousson@xxxxxx>
> Cc: Rajendra Nayak <rnayak@xxxxxx>
> Cc: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> Signed-off-by: Govindraj.R <govindraj.raja@xxxxxx>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux