aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomain.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2013-01-26 02:58:15 -0500
committerPaul Walmsley <paul@pwsan.com>2013-01-29 16:59:57 -0500
commitf8457c2d8be94779c8c460060e536d3a2a02c8d8 (patch)
treec56b0c4814e1a10f1252cb35ff32445ce5261e11 /arch/arm/mach-omap2/powerdomain.c
parentf653b29825817a929a606726f03a04fcd0b2b566 (diff)
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: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.c')
-rw-r--r--arch/arm/mach-omap2/powerdomain.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 92388c04f83d..97b3881dd60d 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -112,7 +112,7 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
112 for (i = 0; i < pwrdm->banks; i++) 112 for (i = 0; i < pwrdm->banks; i++)
113 pwrdm->ret_mem_off_counter[i] = 0; 113 pwrdm->ret_mem_off_counter[i] = 0;
114 114
115 pwrdm_wait_transition(pwrdm); 115 arch_pwrdm->pwrdm_wait_transition(pwrdm);
116 pwrdm->state = pwrdm_read_pwrst(pwrdm); 116 pwrdm->state = pwrdm_read_pwrst(pwrdm);
117 pwrdm->state_counter[pwrdm->state] = 1; 117 pwrdm->state_counter[pwrdm->state] = 1;
118 118
@@ -950,34 +950,14 @@ int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm)
950 return ret; 950 return ret;
951} 951}
952 952
953/**
954 * pwrdm_wait_transition - wait for powerdomain power transition to finish
955 * @pwrdm: struct powerdomain * to wait for
956 *
957 * If the powerdomain @pwrdm is in the process of a state transition,
958 * spin until it completes the power transition, or until an iteration
959 * bailout value is reached. Returns -EINVAL if the powerdomain
960 * pointer is null, -EAGAIN if the bailout value was reached, or
961 * returns 0 upon success.
962 */
963int pwrdm_wait_transition(struct powerdomain *pwrdm)
964{
965 int ret = -EINVAL;
966
967 if (!pwrdm)
968 return -EINVAL;
969
970 if (arch_pwrdm && arch_pwrdm->pwrdm_wait_transition)
971 ret = arch_pwrdm->pwrdm_wait_transition(pwrdm);
972
973 return ret;
974}
975
976int pwrdm_state_switch(struct powerdomain *pwrdm) 953int pwrdm_state_switch(struct powerdomain *pwrdm)
977{ 954{
978 int ret; 955 int ret;
979 956
980 ret = pwrdm_wait_transition(pwrdm); 957 if (!pwrdm || !arch_pwrdm)
958 return -EINVAL;
959
960 ret = arch_pwrdm->pwrdm_wait_transition(pwrdm);
981 if (!ret) 961 if (!ret)
982 ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW); 962 ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
983 963