[U-Boot] [PATCH 20/21] sparc: Generic system restart support

Kyle Moffett Kyle.D.Moffett at boeing.com
Mon Mar 7 18:37:41 CET 2011


The Sparc port appears to use no generic hardware capability for
performing a CPU reset.  Since all of the supported boards use the exact
same code to perform a jump-to-flash it goes into __arch_restart().

This means that Sparc has a no-op __arch_emergency_restart() function.
If the CPU is in an invalid state then jump-to-FLASH probably won't
work.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett at boeing.com>
Cc: Daniel Hellstrom <daniel at gaisler.com>
---
 arch/sparc/lib/board.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c
index 128ece7..e250274 100644
--- a/arch/sparc/lib/board.c
+++ b/arch/sparc/lib/board.c
@@ -445,7 +445,7 @@ void hang(void)
 	for (;;) ;
 }
 
-int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int __arch_restart(void)
 {
 	/* Interrupts off */
 	disable_interrupts();
@@ -456,4 +456,14 @@ int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 	return 1;
 }
 
+/*
+ * The __arch_restart() just jumps back to flash, which isn't safe to do in
+ * emergency conditions.  Since we don't have anything better to do, just
+ * fall through into the default hang().
+ */
+void __arch_emergency_restart(void)
+{
+	return;
+}
+
 /************************************************************************/
-- 
1.7.2.3



More information about the U-Boot mailing list