Module Name:    src
Committed By:   isaki
Date:           Wed Sep 16 05:48:53 UTC 2015

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

Log Message:
To turn off the power, it's necessary to turn off the alarm signal
of RTC before writing the system port.  This is a fix for rev 1.191.
Thanks to Y.Sugahara.
Should be pulled up to netbsd-7.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/arch/x68k/x68k/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/x68k/x68k/machdep.c
diff -u src/sys/arch/x68k/x68k/machdep.c:1.191 src/sys/arch/x68k/x68k/machdep.c:1.192
--- src/sys/arch/x68k/x68k/machdep.c:1.191	Wed Mar 26 16:21:39 2014
+++ src/sys/arch/x68k/x68k/machdep.c	Wed Sep 16 05:48:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.191 2014/03/26 16:21:39 isaki Exp $	*/
+/*	$NetBSD: machdep.c,v 1.192 2015/09/16 05:48:52 isaki Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.191 2014/03/26 16:21:39 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.192 2015/09/16 05:48:52 isaki Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -106,6 +106,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include <machine/bus.h>
 #include <machine/autoconf.h>
 #include <arch/x68k/dev/intiovar.h>
+#include <arch/x68k/x68k/iodevice.h>
 
 extern void doboot(void) __attribute__((__noreturn__));
 
@@ -522,6 +523,10 @@ cpu_reboot(int howto, char *bootstr)
 	if (((howto & RB_POWERDOWN) == RB_POWERDOWN) && power_switch_is_off) {
 		printf("powering off...\n");
 		delay(1000000);
+
+		/* Turn off the alarm signal of RTC */
+		IODEVbase->io_rtc.bank0.reset = 0x0c;
+
 		intio_set_sysport_powoff(0x00);
 		intio_set_sysport_powoff(0x0f);
 		intio_set_sysport_powoff(0x0f);

Reply via email to