diff options
author | Paul Walmsley <paul@pwsan.com> | 2013-01-26 00:58:16 -0700 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2013-01-29 14:59:57 -0700 |
commit | 3a090284056954f382612da42ebe9f3147403ef5 (patch) | |
tree | 6e9627679444b04614577cf55ad77f8e17aed0b9 /arch/arm/mach-omap2/clockdomain.h | |
parent | c4978fba6b2d4e3a584d72c067a371871fecbedc (diff) | |
download | lwn-3a090284056954f382612da42ebe9f3147403ef5.tar.gz lwn-3a090284056954f382612da42ebe9f3147403ef5.zip |
ARM: OMAP2+: powerdomain/clockdomain: add a per-powerdomain spinlock
Add a per-powerdomain spinlock. Use that instead of the clockdomain
spinlock. Add pwrdm_lock()/pwrdm_unlock() functions to allow other
code to acquire or release the powerdomain spinlock without reaching
directly into the struct powerdomain.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jean Pihet <jean.pihet@newoldbits.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.h')
-rw-r--r-- | arch/arm/mach-omap2/clockdomain.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index bc42446e23ab..e7f1b4ba2d5b 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h @@ -15,7 +15,6 @@ #define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAIN_H #include <linux/init.h> -#include <linux/spinlock.h> #include "powerdomain.h" #include "clock.h" @@ -139,7 +138,6 @@ struct clockdomain { struct clkdm_dep *sleepdep_srcs; atomic_t usecount; struct list_head node; - spinlock_t lock; }; /** @@ -196,12 +194,16 @@ int clkdm_del_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2); int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2); int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm); +void clkdm_allow_idle_nolock(struct clockdomain *clkdm); void clkdm_allow_idle(struct clockdomain *clkdm); +void clkdm_deny_idle_nolock(struct clockdomain *clkdm); void clkdm_deny_idle(struct clockdomain *clkdm); bool clkdm_in_hwsup(struct clockdomain *clkdm); bool clkdm_missing_idle_reporting(struct clockdomain *clkdm); +int clkdm_wakeup_nolock(struct clockdomain *clkdm); int clkdm_wakeup(struct clockdomain *clkdm); +int clkdm_sleep_nolock(struct clockdomain *clkdm); int clkdm_sleep(struct clockdomain *clkdm); int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk); |