diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2012-05-08 01:55:38 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2012-05-08 01:55:38 -0400 |
commit | 5a68a736581290d10e2ebaf2e5baa8e21eed6dd5 (patch) | |
tree | 904fdb46fbefb308b962022b556cc4d07692ca77 | |
parent | 96566043b19ae76d3828ce75cbf28dc6d0bcaaf1 (diff) |
ARM: OMAP2+: powerdomain: Get rid off duplicate pwrdm_clkdm_state_switch() API
With patch 'ARM: OMAP2+: powerdomain: Wait for powerdomain transition
in pwrdm_state_switch()', the pwrdm_clkdm_state_switch() API becomes
duplicate of pwrdm_state_switch().
Get rid off duplicate pwrdm_clkdm_state_switch() and update the
users of it with pwrdm_state_switch()
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clockdomain.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.h | 1 |
4 files changed, 4 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index f57ed5baeccf..77db0671d7f1 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -439,7 +439,7 @@ void omap2_clk_disable_unused(struct clk *clk) | |||
439 | clk->ops->disable(clk); | 439 | clk->ops->disable(clk); |
440 | } | 440 | } |
441 | if (clk->clkdm != NULL) | 441 | if (clk->clkdm != NULL) |
442 | pwrdm_clkdm_state_switch(clk->clkdm); | 442 | pwrdm_state_switch(clk->clkdm->pwrdm.ptr); |
443 | } | 443 | } |
444 | #endif | 444 | #endif |
445 | 445 | ||
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index ad07689e1563..8664f5a8bfb6 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -840,7 +840,7 @@ void clkdm_allow_idle(struct clockdomain *clkdm) | |||
840 | spin_lock_irqsave(&clkdm->lock, flags); | 840 | spin_lock_irqsave(&clkdm->lock, flags); |
841 | clkdm->_flags |= _CLKDM_FLAG_HWSUP_ENABLED; | 841 | clkdm->_flags |= _CLKDM_FLAG_HWSUP_ENABLED; |
842 | arch_clkdm->clkdm_allow_idle(clkdm); | 842 | arch_clkdm->clkdm_allow_idle(clkdm); |
843 | pwrdm_clkdm_state_switch(clkdm); | 843 | pwrdm_state_switch(clkdm->pwrdm.ptr); |
844 | spin_unlock_irqrestore(&clkdm->lock, flags); | 844 | spin_unlock_irqrestore(&clkdm->lock, flags); |
845 | } | 845 | } |
846 | 846 | ||
@@ -924,8 +924,7 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm) | |||
924 | 924 | ||
925 | spin_lock_irqsave(&clkdm->lock, flags); | 925 | spin_lock_irqsave(&clkdm->lock, flags); |
926 | arch_clkdm->clkdm_clk_enable(clkdm); | 926 | arch_clkdm->clkdm_clk_enable(clkdm); |
927 | pwrdm_wait_transition(clkdm->pwrdm.ptr); | 927 | pwrdm_state_switch(clkdm->pwrdm.ptr); |
928 | pwrdm_clkdm_state_switch(clkdm); | ||
929 | spin_unlock_irqrestore(&clkdm->lock, flags); | 928 | spin_unlock_irqrestore(&clkdm->lock, flags); |
930 | 929 | ||
931 | pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name); | 930 | pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name); |
@@ -950,7 +949,7 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm) | |||
950 | 949 | ||
951 | spin_lock_irqsave(&clkdm->lock, flags); | 950 | spin_lock_irqsave(&clkdm->lock, flags); |
952 | arch_clkdm->clkdm_clk_disable(clkdm); | 951 | arch_clkdm->clkdm_clk_disable(clkdm); |
953 | pwrdm_clkdm_state_switch(clkdm); | 952 | pwrdm_state_switch(clkdm->pwrdm.ptr); |
954 | spin_unlock_irqrestore(&clkdm->lock, flags); | 953 | spin_unlock_irqrestore(&clkdm->lock, flags); |
955 | 954 | ||
956 | pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name); | 955 | pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name); |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 96ad3dbeac34..96114901b932 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -981,16 +981,6 @@ int pwrdm_state_switch(struct powerdomain *pwrdm) | |||
981 | return ret; | 981 | return ret; |
982 | } | 982 | } |
983 | 983 | ||
984 | int pwrdm_clkdm_state_switch(struct clockdomain *clkdm) | ||
985 | { | ||
986 | if (clkdm != NULL && clkdm->pwrdm.ptr != NULL) { | ||
987 | pwrdm_wait_transition(clkdm->pwrdm.ptr); | ||
988 | return pwrdm_state_switch(clkdm->pwrdm.ptr); | ||
989 | } | ||
990 | |||
991 | return -EINVAL; | ||
992 | } | ||
993 | |||
994 | int pwrdm_pre_transition(void) | 984 | int pwrdm_pre_transition(void) |
995 | { | 985 | { |
996 | pwrdm_for_each(_pwrdm_pre_transition_cb, NULL); | 986 | pwrdm_for_each(_pwrdm_pre_transition_cb, NULL); |
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h index 0d72a8a8ce4d..8f88d65c46ea 100644 --- a/arch/arm/mach-omap2/powerdomain.h +++ b/arch/arm/mach-omap2/powerdomain.h | |||
@@ -213,7 +213,6 @@ bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm); | |||
213 | int pwrdm_wait_transition(struct powerdomain *pwrdm); | 213 | int pwrdm_wait_transition(struct powerdomain *pwrdm); |
214 | 214 | ||
215 | int pwrdm_state_switch(struct powerdomain *pwrdm); | 215 | int pwrdm_state_switch(struct powerdomain *pwrdm); |
216 | int pwrdm_clkdm_state_switch(struct clockdomain *clkdm); | ||
217 | int pwrdm_pre_transition(void); | 216 | int pwrdm_pre_transition(void); |
218 | int pwrdm_post_transition(void); | 217 | int pwrdm_post_transition(void); |
219 | int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); | 218 | int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); |