Skip to content

Commit

Permalink
OMAP3 hwmod: reprogram OCP_SYSCONFIG register after setting SOFTRESET
Browse files Browse the repository at this point in the history
Reprogram the module's OCP_SYSCONFIG register after module reset (SOFTRESET
= 1).  This may not be needed, but the definition of the reset performed by
the SOFTRESET bit is unclear.

Kevin Hilman <khilman@deeprootsystems.com> tested an earlier version of
this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
  • Loading branch information
Paul Walmsley authored and paul committed Dec 12, 2009
1 parent 6f8b7ff commit b835d01
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,11 +945,19 @@ static int _setup(struct omap_hwmod *oh)

_enable(oh);

if (!(oh->flags & HWMOD_INIT_NO_RESET))
_reset(oh);

/* XXX OCP AUTOIDLE bit? */
/* XXX OCP ENAWAKEUP bit? */
if (!(oh->flags & HWMOD_INIT_NO_RESET)) {
/*
* XXX Do the OCP_SYSCONFIG bits need to be
* reprogrammed after a reset? If not, then this can
* be removed. If they do, then probably the
* _enable() function should be split to avoid the
* rewrite of the OCP_SYSCONFIG register.
*/
if (oh->sysconfig) {
_update_sysc_cache(oh);
_sysc_enable(oh);
}
}

if (!(oh->flags & HWMOD_INIT_NO_IDLE))
_idle(oh);
Expand Down

0 comments on commit b835d01

Please sign in to comment.