aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomain44xx.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2010-12-21 22:01:19 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 22:01:19 -0500
commit4b4f62c4672805466652a785070cc2ac8a398e16 (patch)
treefc4fd085d82d8d4898b6c351c8e3dfed3a1ed138 /arch/arm/mach-omap2/powerdomain44xx.c
parent9b7fc907d9378f86eb6b823bbe84ec9ed584b091 (diff)
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 <santosh.shilimkar@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> [paul@pwsan.com: clarified commit message] Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com> Tested-by: Kevin Hilman <khilman@deeprootsystems.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain44xx.c')
-rw-r--r--arch/arm/mach-omap2/powerdomain44xx.c9
1 files changed, 9 insertions, 0 deletions
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)
55 return 0; 55 return 0;
56} 56}
57 57
58static int omap4_pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm)
59{
60 prm_rmw_mod_reg_bits(OMAP4430_LASTPOWERSTATEENTERED_MASK,
61 OMAP4430_LASTPOWERSTATEENTERED_MASK,
62 pwrdm->prcm_offs, OMAP4_PM_PWSTST);
63 return 0;
64}
65
58static int omap4_pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst) 66static int omap4_pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst)
59{ 67{
60 u32 v; 68 u32 v;
@@ -155,6 +163,7 @@ struct pwrdm_ops omap4_pwrdm_operations = {
155 .pwrdm_read_pwrst = omap4_pwrdm_read_pwrst, 163 .pwrdm_read_pwrst = omap4_pwrdm_read_pwrst,
156 .pwrdm_read_prev_pwrst = omap4_pwrdm_read_prev_pwrst, 164 .pwrdm_read_prev_pwrst = omap4_pwrdm_read_prev_pwrst,
157 .pwrdm_set_lowpwrstchange = omap4_pwrdm_set_lowpwrstchange, 165 .pwrdm_set_lowpwrstchange = omap4_pwrdm_set_lowpwrstchange,
166 .pwrdm_clear_all_prev_pwrst = omap4_pwrdm_clear_all_prev_pwrst,
158 .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst, 167 .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst,
159 .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst, 168 .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst,
160 .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst, 169 .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst,