Skip to content

Commit

Permalink
OMAP2+: hwmod: Enable module in shutdown to access sysconfig
Browse files Browse the repository at this point in the history
When calling the shutdown, the module may be already in idle.
Accessing the sysconfig register will then lead to a crash.
In that case, re-enable the module in order to allow the access
to the sysconfig register.

Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
  • Loading branch information
Miguel Vadillo authored and Paul Walmsley committed Jul 10, 2011
1 parent c614ebf commit 6481c73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,8 +1396,11 @@ static int _shutdown(struct omap_hwmod *oh)
}
}

if (oh->class->sysc)
if (oh->class->sysc) {
if (oh->_state == _HWMOD_STATE_IDLE)
_enable(oh);
_shutdown_sysc(oh);
}

/*
* If an IP contains only one HW reset line, then assert it
Expand Down

0 comments on commit 6481c73

Please sign in to comment.