[PATCH v2 0/2] Fixes in hwmod reset code

STALE5238d

Revision v2 of 4 in this series.

6 messages, 2 authors, 2012-04-04 · open the first message on its own page

[PATCH v2 0/2] Fixes in hwmod reset code

From: Rajendra Nayak <hidden>
Date: 2012-03-13 14:03:53

This fixes a couple of issues around hwmod reset
APIs'.
Patches are based on 3.3.-rc7.

Rajendra Nayak (2):
  ARM: omap: hwmod: Restore sysc after a reset
  ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status

 arch/arm/mach-omap2/omap_hwmod.c |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

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

From: Rajendra Nayak <hidden>
Date: 2012-03-13 14:03:54

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>
---
 arch/arm/mach-omap2/omap_hwmod.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index eba6cd3..ae56939 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2270,6 +2270,10 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
 
 	spin_lock_irqsave(&oh->_lock, flags);
 	r = _reset(oh);
+	if (oh->class->sysc) {
+		_update_sysc_cache(oh);
+		_enable_sysc(oh);
+	}
 	spin_unlock_irqrestore(&oh->_lock, flags);
 
 	return r;
-- 
1.7.1

[PATCH v2 2/2] ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status

From: Rajendra Nayak <hidden>
Date: 2012-03-13 14:03:55

omap_hwmod_softreset() does not seem to wait for reset status
after doing a softreset. Make it use _ocp_softreset() instead
which does this correctly.

Signed-off-by: Rajendra Nayak <redacted>
Cc: Benoit Cousson <redacted>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Anand Gadiyar <redacted>
Cc: Shubhrajyoti D <redacted>
---
 arch/arm/mach-omap2/omap_hwmod.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index ae56939..489f82d 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1907,20 +1907,10 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
  */
 int omap_hwmod_softreset(struct omap_hwmod *oh)
 {
-	u32 v;
-	int ret;
-
-	if (!oh || !(oh->_sysc_cache))
+	if (!oh)
 		return -EINVAL;
 
-	v = oh->_sysc_cache;
-	ret = _set_softreset(oh, &v);
-	if (ret)
-		goto error;
-	_write_sysconfig(v, oh);
-
-error:
-	return ret;
+	return _ocp_softreset(oh);
 }
 
 /**
-- 
1.7.1

[PATCH v2 0/2] Fixes in hwmod reset code

From: paul@pwsan.com (Paul Walmsley)
Date: 2012-03-13 14:22:51

Hi Rajendra

On Tue, 13 Mar 2012, Rajendra Nayak wrote:
This fixes a couple of issues around hwmod reset
APIs'.
Patches are based on 3.3.-rc7.

Rajendra Nayak (2):
  ARM: omap: hwmod: Restore sysc after a reset
  ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status

 arch/arm/mach-omap2/omap_hwmod.c |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)
Could you base this on either my 'hwmod_code_cleanup_3.4' branch or 
'hwmod_enable_remaining_hwmods_devel_3.4' branch?  There are some reset 
changes in there also.


- Paul

[PATCH v2 0/2] Fixes in hwmod reset code

From: Rajendra Nayak <hidden>
Date: 2012-03-13 17:24:24

Hi Paul,

On Tuesday 13 March 2012 07:52 PM, Paul Walmsley wrote:
Hi Rajendra

On Tue, 13 Mar 2012, Rajendra Nayak wrote:
quoted
This fixes a couple of issues around hwmod reset
APIs'.
Patches are based on 3.3.-rc7.

Rajendra Nayak (2):
   ARM: omap: hwmod: Restore sysc after a reset
   ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status

  arch/arm/mach-omap2/omap_hwmod.c |   18 ++++++------------
  1 files changed, 6 insertions(+), 12 deletions(-)
Could you base this on either my 'hwmod_code_cleanup_3.4' branch or
'hwmod_enable_remaining_hwmods_devel_3.4' branch?  There are some reset
changes in there also.
Sure, will send them out shortly.

regards,
Rajendra

- Paul

[PATCH v2 2/2] ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status

From: paul@pwsan.com (Paul Walmsley)
Date: 2012-04-04 15:34:31

On Tue, 13 Mar 2012, Rajendra Nayak wrote:
omap_hwmod_softreset() does not seem to wait for reset status
after doing a softreset. Make it use _ocp_softreset() instead
which does this correctly.

Signed-off-by: Rajendra Nayak <redacted>
Cc: Benoit Cousson <redacted>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Anand Gadiyar <redacted>
Cc: Shubhrajyoti D <redacted>
Thanks, queued for 3.4-rc.


- Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help