From: Santosh Shilimkar Date: Wed, 22 Dec 2010 03:01:19 +0000 (-0700) Subject: OMAP4: powerdomain: Add pwrdm_clear_all_prev_pwrst X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4b4f62c4672805466652a785070cc2ac8a398e16;p=linux-beck.git OMAP4: powerdomain: Add pwrdm_clear_all_prev_pwrst Like OMAP3, 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 to the OMAP4 powerdomains implementation to support this. Signed-off-by: Santosh Shilimkar Signed-off-by: Rajendra Nayak [paul@pwsan.com: clarified commit message] Signed-off-by: Paul Walmsley Cc: Benoit Cousson Cc: Kevin Hilman Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Tested-by: Santosh Shilimkar Tested-by: Rajendra Nayak --- diff --git a/arch/arm/mach-omap2/powerdomain44xx.c b/arch/arm/mach-omap2/powerdomain44xx.c index 123a25f3b96f..2903c7cb2d5e 100644 --- a/arch/arm/mach-omap2/powerdomain44xx.c +++ b/arch/arm/mach-omap2/powerdomain44xx.c @@ -55,6 +55,14 @@ static int omap4_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) return 0; } +static int omap4_pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm) +{ + prm_rmw_mod_reg_bits(OMAP4430_LASTPOWERSTATEENTERED_MASK, + OMAP4430_LASTPOWERSTATEENTERED_MASK, + pwrdm->prcm_offs, OMAP4_PM_PWSTST); + return 0; +} + static int omap4_pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst) { u32 v; @@ -155,6 +163,7 @@ struct pwrdm_ops omap4_pwrdm_operations = { .pwrdm_read_pwrst = omap4_pwrdm_read_pwrst, .pwrdm_read_prev_pwrst = omap4_pwrdm_read_prev_pwrst, .pwrdm_set_lowpwrstchange = omap4_pwrdm_set_lowpwrstchange, + .pwrdm_clear_all_prev_pwrst = omap4_pwrdm_clear_all_prev_pwrst, .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst, .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst, .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst,