Thread (6 messages) flat view 6 messages, 2 authors, 2012-04-05
DORMANTno replies

Revision v1 of 5 in this series.

Revisions (5)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v2 [diff vs current]
  4. v1 [diff vs current]
  5. v1 current

[PATCH 1/2] ARM: omap: hwmod: Restore sysc after a reset

From: Rajendra Nayak <hidden>
Date: 2012-04-05 07:11:26
Also in: linux-omap

On Wednesday 04 April 2012 09:11 PM, Paul Walmsley wrote:
On Tue, 13 Mar 2012, Rajendra Nayak wrote:
quoted
After a softreset, make sure the sysc settings are correctly
restored.

Reported-by: Anand Gadiyar<redacted>
Signed-off-by: Rajendra Nayak<redacted>
Cc: Benoit Cousson<redacted>
Cc: Paul Walmsley<paul@pwsan.com>
Cc: Shubhrajyoti D<redacted>
Thanks, this patch has been modified a bit to consolidate the SYSCONFIG
reload after _reset() into the _reset() function itself.  This should
hopefully avoid future mistakes and avoid some code duplication.  Modified
patch follows, queued for 3.4-rc.
Thanks, changes look good.
quoted hunk ↗ jump to hunk

- Paul


From: Rajendra Nayak<redacted>
Date: Tue, 13 Mar 2012 22:55:23 +0530
Subject: [PATCH] ARM: OMAP2+: hwmod: Restore sysc after a reset

After a softreset, make sure the sysc settings are correctly
restored.

Reported-by: Anand Gadiyar<redacted>
Signed-off-by: Rajendra Nayak<redacted>
Cc: Benoit Cousson<redacted>
Cc: Paul Walmsley<paul@pwsan.com>
Cc: Shubhrajyoti D<redacted>
[paul at pwsan.com: combined post-reset SYSCONFIG reload code into the
  _reset() function to avoid duplication and future mistakes]
Signed-off-by: Paul Walmsley<paul@pwsan.com>
---
  arch/arm/mach-omap2/omap_hwmod.c |   18 ++++++------------
  1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5a68010..d32c1ce 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1477,6 +1477,11 @@ static int _reset(struct omap_hwmod *oh)

  	ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh);

+	if (oh->class->sysc) {
+		_update_sysc_cache(oh);
+		_enable_sysc(oh);
+	}
+
  	return ret;
  }
@@ -1786,20 +1791,9 @@ static int _setup(struct omap_hwmod *oh, void *data)
  		return 0;
  	}

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

-		/*
-		 * OCP_SYSCONFIG bits need to be reprogrammed after a softreset.
-		 * The _enable() function should be split to
-		 * avoid the rewrite of the OCP_SYSCONFIG register.
-		 */
-		if (oh->class->sysc) {
-			_update_sysc_cache(oh);
-			_enable_sysc(oh);
-		}
-	}
-
  	postsetup_state = oh->_postsetup_state;
  	if (postsetup_state == _HWMOD_STATE_UNKNOWN)
  		postsetup_state = _HWMOD_STATE_ENABLED;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help