summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
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/clockdomain2xxx_3xxx.c
parentb86cfb52a145d8ddad66b98c39c6764f3883cd5a (diff)
downloadtalos-obmc-linux-555e74ea08bfc04a0136f976cbaa200addf1ba87.tar.gz
talos-obmc-linux-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/clockdomain2xxx_3xxx.c')
-rw-r--r--arch/arm/mach-omap2/clockdomain2xxx_3xxx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
index 48d0db7e6069..f740edb111f4 100644
--- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
@@ -183,7 +183,8 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm)
_clkdm_add_autodeps(clkdm);
_enable_hwsup(clkdm);
} else {
- clkdm_wakeup(clkdm);
+ if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
+ omap2_clkdm_wakeup(clkdm);
}
return 0;
@@ -205,7 +206,8 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm)
_clkdm_del_autodeps(clkdm);
_enable_hwsup(clkdm);
} else {
- clkdm_sleep(clkdm);
+ if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP)
+ omap2_clkdm_sleep(clkdm);
}
return 0;
OpenPOWER on IntegriCloud