diff options
author | Rajendra Nayak <rnayak@ti.com> | 2010-09-28 14:49:34 +0530 |
---|---|---|
committer | Ricardo Perez Olivares <x0081762@ti.com> | 2010-10-06 11:26:50 -0500 |
commit | 9428b15f1513667c829d9f544a55eb04ed903969 (patch) | |
tree | 2b43b92639c347e2fc2a3d1176415083310d64ed /arch | |
parent | 2445997876d3f93bbb2dbdec3fff8cac02fe3a35 (diff) |
OMAP: hwmod: Disable clocks when hwmod enable fails
In cases where a module(hwmod) does not become accesible on enabling
the main clocks (can happen if there are external clocks needed
for the module to become accesible), make sure the clocks are not
left enabled.
This ensures that when the requisite external depenedencies are met
a omap_hwmod_enable and omap_hwmod_idle/shutdown would rightly enable
and disable clocks using clk framework. Leaving the clocks enabled in
the error case causes additional usecounting at the clock framework
level leaving the clock enabled forever.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 811af46f893a..532ac6963384 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -995,6 +995,7 @@ int _omap_hwmod_enable(struct omap_hwmod *oh) _sysc_enable(oh); } } else { + _disable_clocks(oh); pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n", oh->name, r); } |