Re: [PATCH 6/6] OMAP4: powerdomain: Add pwrdm_clear_all_prev_pwrst

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

 



Hi

On Tue, 16 Nov 2010, Rajendra Nayak wrote:

> From: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> 
> OMAP4430 ES2 has additional bitfields in PWRSTST register which help
> identify the previous power state entered by the powerdomain.
> Add pwrdm_clear_all_prev_pwrst api to support this.

OMAP3 has these also.  Please add a similar function for OMAP3.

> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> Signed-off-by: Rajendra Nayak <rnayak@xxxxxx>
> Cc: Paul Walmsley <paul@xxxxxxxxx>
> Cc: Benoit Cousson <b-cousson@xxxxxx>
> Cc: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
> ---
>  arch/arm/mach-omap2/powerdomains44xx.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/powerdomains44xx.c b/arch/arm/mach-omap2/powerdomains44xx.c
> index 79be2cd..0414e6a 100644
> --- a/arch/arm/mach-omap2/powerdomains44xx.c
> +++ b/arch/arm/mach-omap2/powerdomains44xx.c
> @@ -45,6 +45,14 @@ static int omap4_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm)
>  				OMAP4430_LASTPOWERSTATEENTERED_MASK);
>  }
>  
> +static int omap4_pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm)
> +{
> +	prm_rmw_mod_reg_bits(OMAP4430_LASTPOWERSTATEENTERED_MASK,
> +			0x3 << OMAP4430_LASTPOWERSTATEENTERED_SHIFT,

Please just use OMAP4430_LASTPOWERSTATEENTERED_MASK here again rather 
than 0x3 << OMAP4430_LASTPOWERSTATEENTERED_SHIFT.  This avoids introducing 
a magic constant here.

> +			pwrdm->prcm_offs, OMAP4_PM_PWSTST);
> +	return 0;
> +}
> +
>  static int omap4_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm)
>  {
>  	prm_rmw_mod_reg_bits(OMAP4430_LOWPOWERSTATECHANGE_MASK,
> @@ -154,6 +162,7 @@ struct pwrdm_functions omap4_pwrdm_functions = {
>  	.pwrdm_read_next_pwrst	= omap4_pwrdm_read_next_pwrst,
>  	.pwrdm_read_pwrst	= omap4_pwrdm_read_pwrst,
>  	.pwrdm_read_prev_pwrst	= omap4_pwrdm_read_prev_pwrst,
> +	.pwrdm_clear_all_prev_pwrst	= omap4_pwrdm_clear_all_prev_pwrst,
>  	.pwrdm_set_lowpwrstchange	= omap4_pwrdm_set_lowpwrstchange,
>  	.pwrdm_set_logic_retst	= omap4_pwrdm_set_logic_retst,
>  	.pwrdm_read_logic_pwrst	= omap4_pwrdm_read_logic_pwrst,
> -- 
> 1.7.0.4
> 


- Paul
--
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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux