Skip to content

Commit

Permalink
OMAP: hwmod: Do not disable clocks if hwmod already in idle
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benoit Cousson authored and Paul Walmsley committed Sep 21, 2010
1 parent 9ee9fff commit 3827f94
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,9 +982,13 @@ static int _shutdown(struct omap_hwmod *oh)

if (oh->class->sysc)
_sysc_shutdown(oh);
_del_initiator_dep(oh, mpu_oh);
/* XXX what about the other system initiators here? DMA, tesla, d2d */
_disable_clocks(oh);

/* clocks and deps are already disabled in idle */
if (oh->_state == _HWMOD_STATE_ENABLED) {
_del_initiator_dep(oh, mpu_oh);
/* XXX what about the other system initiators here? dma, dsp */
_disable_clocks(oh);
}
/* XXX Should this code also force-disable the optional clocks? */

/* XXX mux any associated balls to safe mode */
Expand Down

0 comments on commit 3827f94

Please sign in to comment.