aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r--arch/arm/plat-omap/clock.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index fc62fb5fc20b..0ae0eae01fd1 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -335,6 +335,38 @@ struct clk *omap_clk_get_by_name(const char *name)
335 return ret; 335 return ret;
336} 336}
337 337
338int omap_clk_enable_autoidle_all(void)
339{
340 struct clk *c;
341 unsigned long flags;
342
343 spin_lock_irqsave(&clockfw_lock, flags);
344
345 list_for_each_entry(c, &clocks, node)
346 if (c->ops->allow_idle)
347 c->ops->allow_idle(c);
348
349 spin_unlock_irqrestore(&clockfw_lock, flags);
350
351 return 0;
352}
353
354int omap_clk_disable_autoidle_all(void)
355{
356 struct clk *c;
357 unsigned long flags;
358
359 spin_lock_irqsave(&clockfw_lock, flags);
360
361 list_for_each_entry(c, &clocks, node)
362 if (c->ops->deny_idle)
363 c->ops->deny_idle(c);
364
365 spin_unlock_irqrestore(&clockfw_lock, flags);
366
367 return 0;
368}
369
338/* 370/*
339 * Low level helpers 371 * Low level helpers
340 */ 372 */