OMAP3 hwmod: reprogram OCP_SYSCONFIG register after setting SOFTRESET
authorPaul Walmsley <paul@pwsan.com>
Tue, 8 Dec 2009 23:34:14 +0000 (16:34 -0700)
committerpaul <paul@twilight.(none)>
Sat, 12 Dec 2009 00:00:43 +0000 (17:00 -0700)
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>
arch/arm/mach-omap2/omap_hwmod.c

index 7aaf5f1eea7af56b79e96637f14740a98207df9e..65a8e0ae394fcb0f27887e1fb01904f98cfd1b87 100644 (file)
@@ -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);