diff options
author | Paul Walmsley <paul@pwsan.com> | 2011-03-10 05:50:09 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2011-03-10 05:50:09 -0500 |
commit | 570b54c7fae65b65320d5a7d4b2249c86eeaa497 (patch) | |
tree | 46d54c9473cbdb17913e162e2a4fb067f7c26d00 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 9599217a06da5f5a95794ca9192c14317d441187 (diff) |
OMAP2+: clockdomain: add flag that will block autodeps from being added for a clockdomain
Add a new clockdomain flag, CLKDM_NO_AUTODEPS, which, when marked on a
clockdomain, will prevent "autodeps" from being associated with the
clockdomain. ("Autodeps" are sleep dependencies and wakeup
dependencies from/to processor modules that are automatically added to
a clockdomain when it is in hardware-supervised idle mode. They are
deprecated -- a relic from the old CDP trees -- but are still in use
for OMAP3.)
Also, prevent the hwmod code from adding or removing initiator
dependencies for clockdomains with this flag set.
This patch should allow others to test which clockdomains actually
still need autodeps.
Thanks to Kevin Hilman <khilman@ti.com> for noting that the original
version should also modify the hwmod code.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index a68a2cf1be34..2dd1ea9859bc 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -460,14 +460,18 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) | |||
460 | * will be accessed by a particular initiator (e.g., if a module will | 460 | * will be accessed by a particular initiator (e.g., if a module will |
461 | * be accessed by the IVA, there should be a sleepdep between the IVA | 461 | * be accessed by the IVA, there should be a sleepdep between the IVA |
462 | * initiator and the module). Only applies to modules in smart-idle | 462 | * initiator and the module). Only applies to modules in smart-idle |
463 | * mode. Returns -EINVAL upon error or passes along | 463 | * mode. If the clockdomain is marked as not needing autodeps, return |
464 | * clkdm_add_sleepdep() value upon success. | 464 | * 0 without doing anything. Otherwise, returns -EINVAL upon error or |
465 | * passes along clkdm_add_sleepdep() value upon success. | ||
465 | */ | 466 | */ |
466 | static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | 467 | static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) |
467 | { | 468 | { |
468 | if (!oh->_clk) | 469 | if (!oh->_clk) |
469 | return -EINVAL; | 470 | return -EINVAL; |
470 | 471 | ||
472 | if (oh->_clk->clkdm && oh->_clk->clkdm->flags & CLKDM_NO_AUTODEPS) | ||
473 | return 0; | ||
474 | |||
471 | return clkdm_add_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); | 475 | return clkdm_add_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); |
472 | } | 476 | } |
473 | 477 | ||
@@ -480,14 +484,18 @@ static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | |||
480 | * be accessed by a particular initiator (e.g., if a module will not | 484 | * be accessed by a particular initiator (e.g., if a module will not |
481 | * be accessed by the IVA, there should be no sleepdep between the IVA | 485 | * be accessed by the IVA, there should be no sleepdep between the IVA |
482 | * initiator and the module). Only applies to modules in smart-idle | 486 | * initiator and the module). Only applies to modules in smart-idle |
483 | * mode. Returns -EINVAL upon error or passes along | 487 | * mode. If the clockdomain is marked as not needing autodeps, return |
484 | * clkdm_del_sleepdep() value upon success. | 488 | * 0 without doing anything. Returns -EINVAL upon error or passes |
489 | * along clkdm_del_sleepdep() value upon success. | ||
485 | */ | 490 | */ |
486 | static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | 491 | static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) |
487 | { | 492 | { |
488 | if (!oh->_clk) | 493 | if (!oh->_clk) |
489 | return -EINVAL; | 494 | return -EINVAL; |
490 | 495 | ||
496 | if (oh->_clk->clkdm && oh->_clk->clkdm->flags & CLKDM_NO_AUTODEPS) | ||
497 | return 0; | ||
498 | |||
491 | return clkdm_del_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); | 499 | return clkdm_del_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); |
492 | } | 500 | } |
493 | 501 | ||