summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/clockdomain.h
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2011-07-10 05:56:55 -0600
committerPaul Walmsley <paul@pwsan.com>2011-07-10 05:56:55 -0600
commit555e74ea08bfc04a0136f976cbaa200addf1ba87 (patch)
treeafac050a2669fcf1e47d764785f9007c568b9e15 /arch/arm/mach-omap2/clockdomain.h
parentb86cfb52a145d8ddad66b98c39c6764f3883cd5a (diff)
downloadlwn-555e74ea08bfc04a0136f976cbaa200addf1ba87.tar.gz
lwn-555e74ea08bfc04a0136f976cbaa200addf1ba87.zip
OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming
Since the clkdm state programming is now done from within the hwmod framework (which uses a per-hwmod lock) instead of the being done from the clock framework (which used a global lock), there is now a need to have per-clkdm locking to prevent races between different hwmods/modules belonging to the same clock domain concurrently programming the clkdm state. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.h')
-rw-r--r--arch/arm/mach-omap2/clockdomain.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
index 8782a5cadfa6..1e50c88b8a07 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -17,6 +17,7 @@
#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAIN_H
#include <linux/init.h>
+#include <linux/spinlock.h>
#include "powerdomain.h"
#include <plat/clock.h>
@@ -128,6 +129,7 @@ struct clockdomain {
const struct omap_chip_id omap_chip;
atomic_t usecount;
struct list_head node;
+ spinlock_t lock;
};
/**