Module Name:    src
Committed By:   kiyohara
Date:           Mon Oct  8 15:34:58 UTC 2012

Modified Files:
        src/sys/arch/bebox/bebox: machdep.c

Log Message:
Left and Right LEDs on in end of cpu_reboot().


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/bebox/bebox/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/bebox/bebox/machdep.c
diff -u src/sys/arch/bebox/bebox/machdep.c:1.104 src/sys/arch/bebox/bebox/machdep.c:1.105
--- src/sys/arch/bebox/bebox/machdep.c:1.104	Sun Aug  7 15:22:19 2011
+++ src/sys/arch/bebox/bebox/machdep.c	Mon Oct  8 15:34:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.104 2011/08/07 15:22:19 kiyohara Exp $	*/
+/*	$NetBSD: machdep.c,v 1.105 2012/10/08 15:34:58 kiyohara Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.104 2011/08/07 15:22:19 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.105 2012/10/08 15:34:58 kiyohara Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -58,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include <machine/powerpc.h>
 
 #include <powerpc/pic/picvar.h> 
+#include <powerpc/pio.h>
+#include <powerpc/prep_bus.h>
 #include <powerpc/psl.h>
 
 #include <dev/cons.h>
@@ -315,5 +317,12 @@ cpu_reboot(int howto, char *what)
 	*ap++ = 0;
 	if (ap[-2] == '-')
 		*ap1 = 0;
+
+	/* Left and Right LED on.  Max 15 for both LED. */
+#define LEFT_LED(x)	(((x) & 0xf) << 4)
+#define RIGHT_LED(x)	(((x) & 0xf))
+
+	outb(PREP_BUS_SPACE_IO + 0x0c00, LEFT_LED(15) | RIGHT_LED(15));
+
 	while (1);
 }

Reply via email to