@@ -44,6 +44,19 @@ int omap4_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm)
OMAP4430_LASTPOWERSTATEENTERED_MASK);
}
+int omap4_pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm)
+{
+ u32 reg;
+
+ omap4_prm_rmw_mod_reg_bits(OMAP4430_LASTPOWERSTATEENTERED_MASK,
+ 0x3 << OMAP4430_LASTPOWERSTATEENTERED_SHIFT,
+ pwrdm->prcm_offs, OMAP4_PM_PWSTST);
+ reg = omap4_prm_read_mod_reg(pwrdm->prcm_offs, pwrdm->context_offset);
+ omap4_prm_write_mod_reg(reg, pwrdm->prcm_offs, pwrdm->context_offset);
+
+ return 0;
+}
+
int omap4_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm)
{
omap4_prm_rmw_mod_reg_bits(OMAP4430_LOWPOWERSTATECHANGE_MASK,
@@ -151,6 +164,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,