[U-Boot] [PATCH V2 18/18] OMAP5: reset: Use cold reset in case of 5430ES1.0

R Sricharan r.sricharan at ti.com
Thu Mar 1 15:38:43 CET 2012


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

Signed-off-by: R Sricharan <r.sricharan at ti.com>
---
 arch/arm/cpu/armv7/omap-common/reset.S |    2 ++
 arch/arm/cpu/armv7/omap5/hwinit.c      |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/reset.S b/arch/arm/cpu/armv7/omap-common/reset.S
index 838b122..3dce2a5 100644
--- a/arch/arm/cpu/armv7/omap-common/reset.S
+++ b/arch/arm/cpu/armv7/omap-common/reset.S
@@ -23,6 +23,7 @@
 
 #include <config.h>
 
+#ifndef CONFIG_OMAP54XX
 .global reset_cpu
 reset_cpu:
 	ldr	r1, rstctl			@ get addr for global reset
@@ -36,3 +37,4 @@ rstctl:
 	.word	PRM_RSTCTRL
 rstbit:
 	.word	PRM_RSTCTRL_RESET
+#endif
diff --git a/arch/arm/cpu/armv7/omap5/hwinit.c b/arch/arm/cpu/armv7/omap5/hwinit.c
index 7da7075..a7c1996 100644
--- a/arch/arm/cpu/armv7/omap5/hwinit.c
+++ b/arch/arm/cpu/armv7/omap5/hwinit.c
@@ -160,3 +160,19 @@ void init_omap_revision(void)
 		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
 	}
 }
+
+static void reset_cpu_omap5(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);
+}
+void reset_cpu(ulong addr)
+	__attribute__((weak, alias("reset_cpu_omap5")));
-- 
1.7.1



More information about the U-Boot mailing list