When available, use the on-chip syscontrol() rom function to perform a
system reset rather than our own local method.

Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]>
---
 cpu/blackfin/reset.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/cpu/blackfin/reset.c b/cpu/blackfin/reset.c
index d1e34b3..be3c182 100644
--- a/cpu/blackfin/reset.c
+++ b/cpu/blackfin/reset.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/blackfin.h>
+#include <asm/mach-common/bits/bootrom.h>
 #include "cpu.h"
 
 /* A system soft reset makes external memory unusable so force
@@ -20,7 +21,7 @@
  * the core reset.
  */
 __attribute__ ((__l1_text__, __noreturn__))
-void bfin_reset(void)
+static void bfin_reset(void)
 {
        /* Wait for completion of "system" events such as cache line
         * line fills so that we avoid infinite stalls later on as
@@ -76,7 +77,10 @@ static inline void bfin_reset_trampoline(void)
        if (board_reset)
                board_reset();
        while (1)
-               asm("jump (%0);" : : "a" (bfin_reset));
+               if (0 /*BOOTROM_CAPS_SYSCONTROL -- current silicon is broken*/)
+                       syscontrol(SYSCTRL_SOFTRESET, NULL, NULL);
+               else
+                       asm("jump (%0);" : : "a" (bfin_reset));
 }
 
 __attribute__ ((__noreturn__))
-- 
1.5.5.3


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to