linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
@ 2016-06-20  3:52 Keerthy
  2016-06-20  7:05 ` Mohammed, Afzal
  0 siblings, 1 reply; 8+ messages in thread
From: Keerthy @ 2016-06-20  3:52 UTC (permalink / raw)
  To: tony
  Cc: linux-omap, linux-kernel, t-kristo, afzal, d-gerlach, s-anna,
	paul, j-keerthy, linux

pruss hwmod RSTST register wrongly points to PWRSTCTRL register in case of
am43xx. Fix the RSTST register offset value.

This can lead to setting of wrong power state values for PER domain.

Fixes: 1c7e224d ("ARM: OMAP2+: hwmod: AM335x: runtime register update")
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 1 +
 arch/arm/mach-omap2/prcm43xx.h                          | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
index 6a73b6c..55c5878 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
@@ -1392,6 +1392,7 @@ static void omap_hwmod_am43xx_rst(void)
 {
 	RSTCTRL(am33xx_pruss_hwmod, AM43XX_RM_PER_RSTCTRL_OFFSET);
 	RSTCTRL(am33xx_gfx_hwmod, AM43XX_RM_GFX_RSTCTRL_OFFSET);
+	RSTST(am33xx_pruss_hwmod, AM43XX_RM_PER_RSTST_OFFSET);
 	RSTST(am33xx_gfx_hwmod, AM43XX_RM_GFX_RSTST_OFFSET);
 }
 
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
index 7c34c44e..babb5db 100644
--- a/arch/arm/mach-omap2/prcm43xx.h
+++ b/arch/arm/mach-omap2/prcm43xx.h
@@ -39,6 +39,7 @@
 
 /* RM RSTST offsets */
 #define AM43XX_RM_GFX_RSTST_OFFSET			0x0014
+#define AM43XX_RM_PER_RSTST_OFFSET			0x0014
 #define AM43XX_RM_WKUP_RSTST_OFFSET			0x0014
 
 /* CM instances */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  2016-06-20  3:52 [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss Keerthy
@ 2016-06-20  7:05 ` Mohammed, Afzal
  2016-06-20  8:23   ` Keerthy
  0 siblings, 1 reply; 8+ messages in thread
From: Mohammed, Afzal @ 2016-06-20  7:05 UTC (permalink / raw)
  To: J, KEERTHY, tony
  Cc: linux-omap, linux-kernel, Kristo, Tero, Gerlach, Dave, Anna,
	Suman, paul, linux

Hi,

J, KEERTHY wrote on Monday, June 20, 2016 9:22 AM:

> pruss hwmod RSTST register wrongly points to PWRSTCTRL register in case of
> am43xx. Fix the RSTST register offset value.

> This can lead to setting of wrong power state values for PER domain.

Just curious, does it happen or noticed by going thr' the code ?

Regards
afzal

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  2016-06-20  7:05 ` Mohammed, Afzal
@ 2016-06-20  8:23   ` Keerthy
  2016-06-20 16:19     ` Suman Anna
  0 siblings, 1 reply; 8+ messages in thread
From: Keerthy @ 2016-06-20  8:23 UTC (permalink / raw)
  To: Mohammed, Afzal, J, KEERTHY, tony
  Cc: linux-omap, linux-kernel, Kristo, Tero, Gerlach, Dave, Anna,
	Suman, paul, linux



On Monday 20 June 2016 12:35 PM, Mohammed, Afzal wrote:
> Hi,
>
> J, KEERTHY wrote on Monday, June 20, 2016 9:22 AM:
>
>> pruss hwmod RSTST register wrongly points to PWRSTCTRL register in case of
>> am43xx. Fix the RSTST register offset value.
>
>> This can lead to setting of wrong power state values for PER domain.
>
> Just curious, does it happen or noticed by going thr' the code ?

No i was trying omap4_prminst_deassert_hardreset on AM43XX on my local 
tree and i saw issues and then saw that RSTST register offsets were 
wrongly populated. Hence fixing the same.

>
> Regards
> afzal
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  2016-06-20  8:23   ` Keerthy
@ 2016-06-20 16:19     ` Suman Anna
  2016-06-21  7:52       ` Mohammed, Afzal
  0 siblings, 1 reply; 8+ messages in thread
From: Suman Anna @ 2016-06-20 16:19 UTC (permalink / raw)
  To: Keerthy, Mohammed, Afzal, J, KEERTHY, tony
  Cc: linux-omap, linux-kernel, Kristo, Tero, Gerlach, Dave, paul, linux

Hi Afzal,

On 06/20/2016 03:23 AM, Keerthy wrote:
> 
> 
> On Monday 20 June 2016 12:35 PM, Mohammed, Afzal wrote:
>> Hi,
>>
>> J, KEERTHY wrote on Monday, June 20, 2016 9:22 AM:
>>
>>> pruss hwmod RSTST register wrongly points to PWRSTCTRL register in
>>> case of
>>> am43xx. Fix the RSTST register offset value.
>>
>>> This can lead to setting of wrong power state values for PER domain.
>>
>> Just curious, does it happen or noticed by going thr' the code ?

It does happen when the pruss module is exercised. We found this when we
tried to do a standby test on suspend, and while it worked on AM33xx,
AM437x failed because of this difference.

regards
Suman

> 
> No i was trying omap4_prminst_deassert_hardreset on AM43XX on my local
> tree and i saw issues and then saw that RSTST register offsets were
> wrongly populated. Hence fixing the same.
> 
>>
>> Regards
>> afzal
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  2016-06-20 16:19     ` Suman Anna
@ 2016-06-21  7:52       ` Mohammed, Afzal
  2016-06-21  9:57         ` Keerthy
  0 siblings, 1 reply; 8+ messages in thread
From: Mohammed, Afzal @ 2016-06-21  7:52 UTC (permalink / raw)
  To: Anna, Suman, J, KEERTHY, J, KEERTHY, tony
  Cc: linux-omap, linux-kernel, Kristo, Tero, Gerlach, Dave, paul, linux

Hi Suman,

Anna, Suman wrote on Monday, June 20, 2016 9:49 PM:

> It does happen when the pruss module is exercised. We found this when we
> tried to do a standby test on suspend, and while it worked on AM33xx,
> AM437x failed because of this difference.

Okay, seems on am335x, PER doesn't have RSTST register itself.

Regards
afzal

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  2016-06-21  7:52       ` Mohammed, Afzal
@ 2016-06-21  9:57         ` Keerthy
  2016-06-22  9:10           ` Keerthy
  0 siblings, 1 reply; 8+ messages in thread
From: Keerthy @ 2016-06-21  9:57 UTC (permalink / raw)
  To: Mohammed, Afzal, Anna, Suman, J, KEERTHY, tony
  Cc: linux-omap, linux-kernel, Kristo, Tero, Gerlach, Dave, paul, linux



On Tuesday 21 June 2016 01:22 PM, Mohammed, Afzal wrote:
> Hi Suman,
>
> Anna, Suman wrote on Monday, June 20, 2016 9:49 PM:
>
>> It does happen when the pruss module is exercised. We found this when we
>> tried to do a standby test on suspend, and while it worked on AM33xx,
>> AM437x failed because of this difference.
>
> Okay, seems on am335x, PER doesn't have RSTST register itself.

Seems like code has some reference!

arch/arm/mach-omap2/prm33xx.h
#define AM33XX_RM_PER_RSTST_OFFSET		0x0004

But TRM: http://www.ti.com/lit/ug/spruh73m/spruh73m.pdf
claims that offset is reserved.

Should i remove the above lines altogether?

>
> Regards
> afzal
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  2016-06-21  9:57         ` Keerthy
@ 2016-06-22  9:10           ` Keerthy
  2016-06-22  9:59             ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Keerthy @ 2016-06-22  9:10 UTC (permalink / raw)
  To: Mohammed, Afzal, Anna, Suman, J, KEERTHY, tony
  Cc: linux-omap, linux-kernel, Kristo, Tero, Gerlach, Dave, paul, linux

Tony,

On Tuesday 21 June 2016 03:27 PM, Keerthy wrote:
>
>
> On Tuesday 21 June 2016 01:22 PM, Mohammed, Afzal wrote:
>> Hi Suman,
>>
>> Anna, Suman wrote on Monday, June 20, 2016 9:49 PM:
>>
>>> It does happen when the pruss module is exercised. We found this when we
>>> tried to do a standby test on suspend, and while it worked on AM33xx,
>>> AM437x failed because of this difference.
>>
>> Okay, seems on am335x, PER doesn't have RSTST register itself.
>
> Seems like code has some reference!
>
> arch/arm/mach-omap2/prm33xx.h
> #define AM33XX_RM_PER_RSTST_OFFSET        0x0004
>
> But TRM: http://www.ti.com/lit/ug/spruh73m/spruh73m.pdf
> claims that offset is reserved.
>
> Should i remove the above lines altogether?
>

Can you pull this patch as well?

>>
>> Regards
>> afzal
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  2016-06-22  9:10           ` Keerthy
@ 2016-06-22  9:59             ` Tony Lindgren
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2016-06-22  9:59 UTC (permalink / raw)
  To: Keerthy
  Cc: Mohammed, Afzal, Anna, Suman, J, KEERTHY, linux-omap,
	linux-kernel, Kristo, Tero, Gerlach, Dave, paul, linux

* Keerthy <a0393675@ti.com> [160622 02:13]:
> Can you pull this patch as well?

OK thanks applying into omap-for-v4.8/soc.

Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-06-22 10:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20  3:52 [PATCH] ARM: AM43XX: hwmod: Fix RSTST register offset for pruss Keerthy
2016-06-20  7:05 ` Mohammed, Afzal
2016-06-20  8:23   ` Keerthy
2016-06-20 16:19     ` Suman Anna
2016-06-21  7:52       ` Mohammed, Afzal
2016-06-21  9:57         ` Keerthy
2016-06-22  9:10           ` Keerthy
2016-06-22  9:59             ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).