The Nios-II 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 Nios-II 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.moff...@boeing.com>
Cc: Scott McNutt <smcn...@psyent.com>
---
 arch/nios2/cpu/cpu.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index ef360ee..9f40188 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -40,10 +40,20 @@ int checkcpu (void)
        return (0);
 }
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int __arch_restart(void)
 {
        disable_interrupts();
        /* indirect call to go beyond 256MB limitation of toolchain */
        nios2_callr(CONFIG_SYS_RESET_ADDR);
        return 0;
 }
+
+/*
+ * 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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to