提交 f8457c2d 编写于 作者: P Paul Walmsley

ARM: OMAP2: PM/powerdomain: drop unnecessary pwrdm_wait_transition()

Drop an unnecessary pwrdm_wait_transition() from mach-omap2/pm.c -
it's called by the subsequent pwrdm_state_switch().

Also get rid of pwrdm_wait_transition() in the powerdomain code - there's
no longer any need to export this function.
Signed-off-by: NPaul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
上级 f653b298
...@@ -171,7 +171,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 pwrst) ...@@ -171,7 +171,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 pwrst)
break; break;
case LOWPOWERSTATE_SWITCH: case LOWPOWERSTATE_SWITCH:
pwrdm_set_lowpwrstchange(pwrdm); pwrdm_set_lowpwrstchange(pwrdm);
pwrdm_wait_transition(pwrdm);
pwrdm_state_switch(pwrdm); pwrdm_state_switch(pwrdm);
break; break;
} }
......
...@@ -112,7 +112,7 @@ static int _pwrdm_register(struct powerdomain *pwrdm) ...@@ -112,7 +112,7 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
for (i = 0; i < pwrdm->banks; i++) for (i = 0; i < pwrdm->banks; i++)
pwrdm->ret_mem_off_counter[i] = 0; pwrdm->ret_mem_off_counter[i] = 0;
pwrdm_wait_transition(pwrdm); arch_pwrdm->pwrdm_wait_transition(pwrdm);
pwrdm->state = pwrdm_read_pwrst(pwrdm); pwrdm->state = pwrdm_read_pwrst(pwrdm);
pwrdm->state_counter[pwrdm->state] = 1; pwrdm->state_counter[pwrdm->state] = 1;
...@@ -950,34 +950,14 @@ int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) ...@@ -950,34 +950,14 @@ int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm)
return ret; return ret;
} }
/**
* pwrdm_wait_transition - wait for powerdomain power transition to finish
* @pwrdm: struct powerdomain * to wait for
*
* If the powerdomain @pwrdm is in the process of a state transition,
* spin until it completes the power transition, or until an iteration
* bailout value is reached. Returns -EINVAL if the powerdomain
* pointer is null, -EAGAIN if the bailout value was reached, or
* returns 0 upon success.
*/
int pwrdm_wait_transition(struct powerdomain *pwrdm)
{
int ret = -EINVAL;
if (!pwrdm)
return -EINVAL;
if (arch_pwrdm && arch_pwrdm->pwrdm_wait_transition)
ret = arch_pwrdm->pwrdm_wait_transition(pwrdm);
return ret;
}
int pwrdm_state_switch(struct powerdomain *pwrdm) int pwrdm_state_switch(struct powerdomain *pwrdm)
{ {
int ret; int ret;
ret = pwrdm_wait_transition(pwrdm); if (!pwrdm || !arch_pwrdm)
return -EINVAL;
ret = arch_pwrdm->pwrdm_wait_transition(pwrdm);
if (!ret) if (!ret)
ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW); ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
......
...@@ -225,8 +225,6 @@ int pwrdm_enable_hdwr_sar(struct powerdomain *pwrdm); ...@@ -225,8 +225,6 @@ int pwrdm_enable_hdwr_sar(struct powerdomain *pwrdm);
int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm); int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm);
bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm); bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm);
int pwrdm_wait_transition(struct powerdomain *pwrdm);
int pwrdm_state_switch(struct powerdomain *pwrdm); int pwrdm_state_switch(struct powerdomain *pwrdm);
int pwrdm_pre_transition(struct powerdomain *pwrdm); int pwrdm_pre_transition(struct powerdomain *pwrdm);
int pwrdm_post_transition(struct powerdomain *pwrdm); int pwrdm_post_transition(struct powerdomain *pwrdm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册