PERFORCE change 71359 for review

John-Mark Gurney jmg at FreeBSD.org
Sat Feb 19 19:18:55 PST 2005


http://perforce.freebsd.org/chv.cgi?CH=71359

Change 71359 by jmg at jmg_carbon on 2005/02/20 03:18:12

	add code to reset the cpu on the TS-7200 board...
	
	Submitted by:	cognet
	Obtained from:	NetBSD

Affected files ...

.. //depot/projects/arm/src/sys/arm/ep93xx/ep93xx.c#2 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/ep93xx/ep93xx.c#2 (text+ko) ====

@@ -67,6 +67,8 @@
 #include <arm/ep93xx/ep93xxreg.h> 
 #include <arm/ep93xx/ep93xxvar.h> 
 
+#include <arm/ep93xx/tsarmreg.h> /* XXX */
+
 /* Software copy of the IRQs we have enabled. */
 __volatile u_int32_t vic1_intr_enabled;
 __volatile u_int32_t vic2_intr_enabled;
@@ -180,7 +182,28 @@
 void
 cpu_reset(void)
 {
-	while(1);
+	/*
+	 * Make really really sure that all interrupts are disabled,
+	 * and poke the Internal Bus and Peripheral Bus reset lines.
+	 */
+	(void) disable_interrupts(I32_bit|F32_bit);
+	{
+	 	u_int32_t feed, ctrl;
+		
+		feed = TS7XXX_IO16_VBASE + TS7XXX_WDOGFEED;
+		ctrl = TS7XXX_IO16_VBASE + TS7XXX_WDOGCTRL;
+		
+		__asm __volatile (
+	    	    "mov r0, #0x5\n"
+		    "mov r1, #0x1\n"
+    		    "strh r0, [%0]\n"
+		    "strh r1, [%1]\n"
+		    :
+		    : "r" (feed), "r" (ctrl)
+		    : "r0", "r1"
+    		    );
+    	}
+	while (1);
 }
 
 static struct resource *


More information about the p4-projects mailing list