Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2006 08:58:26 GMT
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 98055 for review
Message-ID:  <200605290858.k4T8wQq1076587@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=98055

Change 98055 by kevlo@kevlo_rtsl on 2006/05/29 08:57:56

	Implement cpu_reset.

Affected files ...

.. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#2 edit

Differences ...

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

@@ -30,6 +30,7 @@
  */
 
 #include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -172,7 +173,12 @@
 void
 cpu_reset(void)
 {
-	while (1);
+	(void) disable_interrupts(I32_bit|F32_bit);
+
+	*(volatile unsigned int *)(S3C2410_WDT_BASE + WDT_WTCON)
+		= (0 << WTCON_PRESCALE_SHIFT) | WTCON_ENABLE |
+		WTCON_CLKSEL_16 | WTCON_ENRST;
+	for(;;);
 }
 
 int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605290858.k4T8wQq1076587>