linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: AM33xx: PRM: Remove wrongly defined RSTST offset for PER Domain
@ 2016-06-21 10:08 Keerthy
  2016-06-21 22:25 ` Suman Anna
  2016-06-22  8:00 ` Tony Lindgren
  0 siblings, 2 replies; 4+ messages in thread
From: Keerthy @ 2016-06-21 10:08 UTC (permalink / raw)
  To: rnayak, tony
  Cc: linux-omap, linux-kernel, t-kristo, afzal, d-gerlach, s-anna,
	paul, j-keerthy, linux

As per the TRM: http://www.ti.com/lit/ug/spruh73m/spruh73m.pdf
offset 0x4 is reserved for PRM_PER. Hence removing the wrongly
defined address offset.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 arch/arm/mach-omap2/prm33xx.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-omap2/prm33xx.h b/arch/arm/mach-omap2/prm33xx.h
index 2bc4ec5..66302c6 100644
--- a/arch/arm/mach-omap2/prm33xx.h
+++ b/arch/arm/mach-omap2/prm33xx.h
@@ -52,8 +52,6 @@
 /* PRM.PER_PRM register offsets */
 #define AM33XX_RM_PER_RSTCTRL_OFFSET		0x0000
 #define AM33XX_RM_PER_RSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0000)
-#define AM33XX_RM_PER_RSTST_OFFSET		0x0004
-#define AM33XX_RM_PER_RSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0004)
 #define AM33XX_PM_PER_PWRSTST_OFFSET		0x0008
 #define AM33XX_PM_PER_PWRSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0008)
 #define AM33XX_PM_PER_PWRSTCTRL_OFFSET		0x000c
-- 
1.9.1

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

* Re: [PATCH] ARM: AM33xx: PRM: Remove wrongly defined RSTST offset for PER Domain
  2016-06-21 10:08 [PATCH] ARM: AM33xx: PRM: Remove wrongly defined RSTST offset for PER Domain Keerthy
@ 2016-06-21 22:25 ` Suman Anna
  2016-06-22  5:24   ` Keerthy
  2016-06-22  8:00 ` Tony Lindgren
  1 sibling, 1 reply; 4+ messages in thread
From: Suman Anna @ 2016-06-21 22:25 UTC (permalink / raw)
  To: Keerthy, rnayak, tony
  Cc: linux-omap, linux-kernel, t-kristo, afzal, d-gerlach, paul, linux

Hi Keerthy,

On 06/21/2016 05:08 AM, Keerthy wrote:
> As per the TRM: http://www.ti.com/lit/ug/spruh73m/spruh73m.pdf
> offset 0x4 is reserved for PRM_PER. Hence removing the wrongly
> defined address offset.

Thanks for the patch.  These macros are not used anywhere, so it should
be safe to remove these. I have tested this patch with an off-tree PRUSS
driver releasing the reset, it works as expected without throwing any
issues.

That said, the current omap_hwmod code assumes default rstst_offs and
st_shift and tries to still write some value into the RSTCTRL register
in am33xx_prm_deassert_hardreset(), but it didn't have any side-affects
though on AM33xx. This is what affected the AM437x due to incorrect
RSTST offset value. That behavior is independent of this patch though.

Tested-by: Suman Anna <s-anna@ti.com>

regards
Suman

> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>  arch/arm/mach-omap2/prm33xx.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/prm33xx.h b/arch/arm/mach-omap2/prm33xx.h
> index 2bc4ec5..66302c6 100644
> --- a/arch/arm/mach-omap2/prm33xx.h
> +++ b/arch/arm/mach-omap2/prm33xx.h
> @@ -52,8 +52,6 @@
>  /* PRM.PER_PRM register offsets */
>  #define AM33XX_RM_PER_RSTCTRL_OFFSET		0x0000
>  #define AM33XX_RM_PER_RSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0000)
> -#define AM33XX_RM_PER_RSTST_OFFSET		0x0004
> -#define AM33XX_RM_PER_RSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0004)
>  #define AM33XX_PM_PER_PWRSTST_OFFSET		0x0008
>  #define AM33XX_PM_PER_PWRSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0008)
>  #define AM33XX_PM_PER_PWRSTCTRL_OFFSET		0x000c
> 

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

* Re: [PATCH] ARM: AM33xx: PRM: Remove wrongly defined RSTST offset for PER Domain
  2016-06-21 22:25 ` Suman Anna
@ 2016-06-22  5:24   ` Keerthy
  0 siblings, 0 replies; 4+ messages in thread
From: Keerthy @ 2016-06-22  5:24 UTC (permalink / raw)
  To: Suman Anna, Keerthy, rnayak, tony
  Cc: linux-omap, linux-kernel, t-kristo, afzal, d-gerlach, paul, linux



On Wednesday 22 June 2016 03:55 AM, Suman Anna wrote:
> Hi Keerthy,
>
> On 06/21/2016 05:08 AM, Keerthy wrote:
>> As per the TRM: http://www.ti.com/lit/ug/spruh73m/spruh73m.pdf
>> offset 0x4 is reserved for PRM_PER. Hence removing the wrongly
>> defined address offset.
>
> Thanks for the patch.  These macros are not used anywhere, so it should
> be safe to remove these. I have tested this patch with an off-tree PRUSS
> driver releasing the reset, it works as expected without throwing any
> issues.
>
> That said, the current omap_hwmod code assumes default rstst_offs and
> st_shift and tries to still write some value into the RSTCTRL register
> in am33xx_prm_deassert_hardreset(), but it didn't have any side-affects
> though on AM33xx. This is what affected the AM437x due to incorrect
> RSTST offset value. That behavior is independent of this patch though.
>
> Tested-by: Suman Anna <s-anna@ti.com>

Thanks for testing!

>
> regards
> Suman
>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>> ---
>>   arch/arm/mach-omap2/prm33xx.h | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/prm33xx.h b/arch/arm/mach-omap2/prm33xx.h
>> index 2bc4ec5..66302c6 100644
>> --- a/arch/arm/mach-omap2/prm33xx.h
>> +++ b/arch/arm/mach-omap2/prm33xx.h
>> @@ -52,8 +52,6 @@
>>   /* PRM.PER_PRM register offsets */
>>   #define AM33XX_RM_PER_RSTCTRL_OFFSET		0x0000
>>   #define AM33XX_RM_PER_RSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0000)
>> -#define AM33XX_RM_PER_RSTST_OFFSET		0x0004
>> -#define AM33XX_RM_PER_RSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0004)
>>   #define AM33XX_PM_PER_PWRSTST_OFFSET		0x0008
>>   #define AM33XX_PM_PER_PWRSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0008)
>>   #define AM33XX_PM_PER_PWRSTCTRL_OFFSET		0x000c
>>
>

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

* Re: [PATCH] ARM: AM33xx: PRM: Remove wrongly defined RSTST offset for PER Domain
  2016-06-21 10:08 [PATCH] ARM: AM33xx: PRM: Remove wrongly defined RSTST offset for PER Domain Keerthy
  2016-06-21 22:25 ` Suman Anna
@ 2016-06-22  8:00 ` Tony Lindgren
  1 sibling, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2016-06-22  8:00 UTC (permalink / raw)
  To: Keerthy
  Cc: rnayak, linux-omap, linux-kernel, t-kristo, afzal, d-gerlach,
	s-anna, paul, linux

* Keerthy <j-keerthy@ti.com> [160621 03:11]:
> As per the TRM: http://www.ti.com/lit/ug/spruh73m/spruh73m.pdf
> offset 0x4 is reserved for PRM_PER. Hence removing the wrongly
> defined address offset.

Applying into omap-for-v4.8/dt thanks.

Tony

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-21 10:08 [PATCH] ARM: AM33xx: PRM: Remove wrongly defined RSTST offset for PER Domain Keerthy
2016-06-21 22:25 ` Suman Anna
2016-06-22  5:24   ` Keerthy
2016-06-22  8:00 ` 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).