[U-Boot-Users] [PATCH/review] Blackfin: use on-chip syscontrol() to reset

Mike Frysinger vapier at gentoo.org
Sun Jun 1 07:38:43 CEST 2008


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 <vapier at gentoo.org>
---
 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





More information about the U-Boot mailing list