Skip to contentSkip to conversation

Fixes in hwmod reset code

PATCH Superseded Rajendra Nayak 2 participants 6 messages Mar 13, 2012 – Apr 4, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover Fixes in hwmod reset code

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(-)
#1 lore raw

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

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

Cc Benoit Cousson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Shubhrajyoti D <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +4 -0
index eba6cd3..ae56939 100644
@@ -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;
Signature · 1 line
1.7.1
#2 lore raw

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

In reply to Rajendra Nayak

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.

Cc Benoit Cousson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Anand Gadiyar <[email protected]>
Cc Shubhrajyoti D <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +2 -12
index ae56939..489f82d 100644
@@ -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);
 }
 
 /**
Signature · 1 line
1.7.1
maintainer
#3 lore raw

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

Quoted 9 lines · Rajendra Nayak

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.

Cc Benoit Cousson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Anand Gadiyar <[email protected]>
Cc Shubhrajyoti D <[email protected]>

Thanks, queued for 3.4-rc.

- Paul

maintainer
#4 lore raw

v2 cover Fixes in hwmod reset code

In reply to Rajendra Nayak

Hi Rajendra

Quoted 10 lines · Rajendra Nayak

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

#5 lore raw

v2 cover Fixes in hwmod reset code

Hi Paul,

Quoted 12 lines · Paul Walmsley

Hi Rajendra

Quoted 8 lines · Rajendra Nayak

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

Quoted 6 lines
Quoted 2 lines
  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

Quoted 3 lines

- Paul