Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/bebox/bebox Left and Right LEDs on in end of cpu_re...



details:   https://anonhg.NetBSD.org/src/rev/91112da4be6c
branches:  trunk
changeset: 781937:91112da4be6c
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Mon Oct 08 15:34:58 2012 +0000

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

diffstat:

 sys/arch/bebox/bebox/machdep.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r cb0906066260 -r 91112da4be6c sys/arch/bebox/bebox/machdep.c
--- a/sys/arch/bebox/bebox/machdep.c    Mon Oct 08 15:09:48 2012 +0000
+++ b/sys/arch/bebox/bebox/machdep.c    Mon Oct 08 15:34:58 2012 +0000
@@ -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 @@
 #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 @@
        *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);
 }



Home | Main Index | Thread Index | Old Index