Skip to contentSkip to conversation

OMAP5: reset: Use cold reset in case of 5430ES1.0

PATCH Superseded R Sricharan 3 participants 4 messages Mar 7, 2012 – Mar 8, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 OMAP5: reset: Use cold reset in case of 5430ES1.0

Warm reset is not functional in case of omap5430ES1.0. So use cold reset instead.

---
[v3]
Addressed Tom Rini's comments.<[email protected]>

 arch/arm/cpu/armv7/omap-common/reset.S |    3 +++
 arch/arm/cpu/armv7/omap5/hwinit.c      |   15 +++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/omap-common/reset.S +3 -0
index 838b122..f2a522a 100644
@@ -23,6 +23,8 @@
 
 #include <config.h>
 
+#ifndef CONFIG_OMAP54XX
+.type  reset_cpu, %function
 .global reset_cpu
 reset_cpu:
 	ldr	r1, rstctl			@ get addr for global reset
@@ -36,3 +38,4 @@ rstctl:
 	.word	PRM_RSTCTRL
 rstbit:
 	.word	PRM_RSTCTRL_RESET
+#endif
arch/arm/cpu/armv7/omap5/hwinit.c +15 -0
index 7da7075..d03e746 100644
@@ -35,6 +35,7 @@
 #include <asm/sizes.h>
 #include <asm/utils.h>
 #include <asm/arch/gpio.h>
+#include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -160,3 +161,17 @@ void init_omap_revision(void)
 		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
 	}
 }
+
+void __weak reset_cpu(ulong addr)
+{
+	u32 omap_rev = omap_revision();
+
+	/*
+	 * WARM reset is not functional in case of OMAP5430 ES1.0 soc.
+	 * So use cold reset in case instead.
+	 */
+	if (omap_rev == OMAP5430_ES1_0)
+		writel(PRM_RSTCTRL_RESET << 0x1, PRM_RSTCTRL);
+	else
+		writel(PRM_RSTCTRL_RESET, PRM_RSTCTRL);
+}
Signature · 1 line
1.7.1
#1 lore raw

PATCH v3 1/1 OMAP5: reset: Use cold reset in case of 5430ES1.0

Quoted 26 lines · R Sricharan

Warm reset is not functional in case of omap5430ES1.0. So use cold reset instead.

---
?[v3]
? ? Addressed Tom Rini's comments.<[email protected]>

?arch/arm/cpu/armv7/omap-common/reset.S | ? ?3 +++ ?arch/arm/cpu/armv7/omap5/hwinit.c ? ? ?| ? 15 +++++++++++++++ ?2 files changed, 18 insertions(+), 0 deletions(-)

arch/arm/cpu/armv7/omap-common/reset.S +0 -0
index 838b122..f2a522a 100644
@@ -23,6 +23,8 @@
 

?#include <config.h>

+#ifndef CONFIG_OMAP54XX
+.type ?reset_cpu, %function
?.global reset_cpu
?reset_cpu:
? ? ? ?ldr ? ? r1, rstctl ? ? ? ? ? ? ? ? ? ? ?@ get addr for global reset

arch/arm/cpu/armv7/omap-common/reset.S +0 -0
@@ -36,3 +38,4 @@ rstctl:
Quoted 4 lines

? ? ? ?.word ? PRM_RSTCTRL
?rstbit:
? ? ? ?.word ? PRM_RSTCTRL_RESET
+#endif

instead of doing the #ifdeffery, why not make this a C file with weak and override it in omap5 as needed?

Quoted 20 lines
arch/arm/cpu/armv7/omap5/hwinit.c +0 -0
index 7da7075..d03e746 100644
@@ -35,6 +35,7 @@

?#include <asm/sizes.h>
?#include <asm/utils.h>
?#include <asm/arch/gpio.h>
+#include <linux/compiler.h>

?DECLARE_GLOBAL_DATA_PTR;

arch/arm/cpu/armv7/omap5/hwinit.c +4 -0
@@ -160,3 +161,17 @@ void init_omap_revision(void)
 ? ? ? ? ? ? ? ?*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
 ? ? ? ?}
 ?}
+
+void __weak reset_cpu(ulong addr)
+{
+ ? ? ? u32 omap_rev = omap_revision();

arch/arm/cpu/armv7/omap5/hwinit.c void init_omap_revision(void) · line 177

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hwinit.c +10 -0
+
+ ? ? ? /*
+ ? ? ? ?* WARM reset is not functional in case of OMAP5430 ES1.0 soc.
+ ? ? ? ?* So use cold reset in case instead.
+ ? ? ? ?*/
+ ? ? ? if (omap_rev == OMAP5430_ES1_0)
+ ? ? ? ? ? ? ? writel(PRM_RSTCTRL_RESET << 0x1, PRM_RSTCTRL);
+ ? ? ? else
+ ? ? ? ? ? ? ? writel(PRM_RSTCTRL_RESET, PRM_RSTCTRL);
+}

Regards,
Nishanth Menon

#2 lore raw

PATCH v3 1/1 OMAP5: reset: Use cold reset in case of 5430ES1.0

Quoted 21 lines · Nishanth
Quoted 20 lines · R Sricharan

Warm reset is not functional in case of omap5430ES1.0. So use cold reset instead.

---
[v3]
Addressed Tom Rini's comments.<[email protected]>

  arch/arm/cpu/armv7/omap-common/reset.S |    3 +++
  arch/arm/cpu/armv7/omap5/hwinit.c      |   15 +++++++++++++++
  2 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/omap-common/reset.S +0 -0
index 838b122..f2a522a 100644
@@ -23,6 +23,8 @@
 
  #include<config.h>
 
Quoted 13 lines

arch/arm/cpu/armv7/omap-common/reset.S rstctl: · line 41

Quoted 10 lines
arch/arm/cpu/armv7/omap-common/reset.S +3 -0
+#ifndef CONFIG_OMAP54XX
+.type  reset_cpu, %function
  .global reset_cpu
  reset_cpu:
        ldr     r1, rstctl                      @ get addr for global reset
@@ -36,3 +38,4 @@ rstctl:
        .word   PRM_RSTCTRL
  rstbit:
        .word   PRM_RSTCTRL_RESET
+#endif

instead of doing the #ifdeffery, why not make this a C file with weak and override it in omap5 as needed?

Agreed, thanks.

Signature · 1 line
Tom
#3 lore raw

PATCH v3 1/1 OMAP5: reset: Use cold reset in case of 5430ES1.0

Thanks,
Sricharan

Quoted 46 lines

-----Original Message-----
From: Tom Rini [mailto:trini at ti.com]
Sent: Thursday, March 08, 2012 12:15 AM
To: Menon, Nishanth
Cc: R Sricharan; u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V3] OMAP5: reset: Use cold reset in case of 5430ES1.0

Quoted 9 lines · Nishanth
Quoted 8 lines · R Sricharan

Warm reset is not functional in case of omap5430ES1.0. So use cold reset instead.

---
[v3]
Addressed Tom Rini's comments.<[email protected]>

Quoted 5 lines

Review

Quoted 5 lines
  arch/arm/cpu/armv7/omap-common/reset.S |    3 +++
  arch/arm/cpu/armv7/omap5/hwinit.c      |   15 +++++++++++++++
  2 files changed, 18 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/cpu/armv7/omap-common/reset.S

Quoted 5 lines
Quoted 5 lines

index 838b122..f2a522a 100644

arch/arm/cpu/armv7/omap-common/reset.S +0 -0
@@ -23,6 +23,8 @@
 
Quoted 7 lines

arch/arm/cpu/armv7/omap-common/reset.S

Quoted 7 lines
arch/arm/cpu/armv7/omap-common/reset.S +2 -0
  #include<config.h>
 
+#ifndef CONFIG_OMAP54XX
+.type  reset_cpu, %function
  .global reset_cpu
  reset_cpu:
        ldr     r1, rstctl                      @ get addr for

global reset

Quoted 8 lines

arch/arm/cpu/armv7/omap-common/reset.S rstctl: · line 41

Quoted 5 lines
arch/arm/cpu/armv7/omap-common/reset.S +1 -0
@@ -36,3 +38,4 @@ rstctl:
        .word   PRM_RSTCTRL
  rstbit:
        .word   PRM_RSTCTRL_RESET
+#endif

instead of doing the #ifdeffery, why not make this a C file with weak and override it in omap5 as needed?

Quoted 2 lines

Agreed, thanks.

Ok. Will repost this one as well.

Quoted 2 lines

--
Tom