diff options
author | Benoit Cousson <b-cousson@ti.com> | 2010-09-21 12:34:08 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-09-21 17:10:52 -0400 |
commit | 3827f9492bdff045ae57fe67e65ce7e259ed4219 (patch) | |
tree | 29667bce8477d1b067f5449fd1b0c6e5476fdfc9 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 9ee9fff92e02e8c5f84794b3a5ce47646c2dfc39 (diff) |
OMAP: hwmod: Do not disable clocks if hwmod already in idle
The disable function was disabling clocks and dependencies
from both enable and idle state. Since idle function is already
disabling both, an enable -> idle -> disable sequence will
try to disable twice the clocks and thus generate a
"Trying disable clock XXX with 0 usecount" warning.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 8bf19a7efb5c..5bb25e319b76 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -982,9 +982,13 @@ static int _shutdown(struct omap_hwmod *oh) | |||
982 | 982 | ||
983 | if (oh->class->sysc) | 983 | if (oh->class->sysc) |
984 | _sysc_shutdown(oh); | 984 | _sysc_shutdown(oh); |
985 | _del_initiator_dep(oh, mpu_oh); | 985 | |
986 | /* XXX what about the other system initiators here? DMA, tesla, d2d */ | 986 | /* clocks and deps are already disabled in idle */ |
987 | _disable_clocks(oh); | 987 | if (oh->_state == _HWMOD_STATE_ENABLED) { |
988 | _del_initiator_dep(oh, mpu_oh); | ||
989 | /* XXX what about the other system initiators here? dma, dsp */ | ||
990 | _disable_clocks(oh); | ||
991 | } | ||
988 | /* XXX Should this code also force-disable the optional clocks? */ | 992 | /* XXX Should this code also force-disable the optional clocks? */ |
989 | 993 | ||
990 | /* XXX mux any associated balls to safe mode */ | 994 | /* XXX mux any associated balls to safe mode */ |