Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/x68k To turn off the power, it's necessary to ...
details: https://anonhg.NetBSD.org/src/rev/0fbaf06d2900
branches: trunk
changeset: 340597:0fbaf06d2900
user: isaki <isaki%NetBSD.org@localhost>
date: Wed Sep 16 05:48:52 2015 +0000
description:
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.
diffstat:
sys/arch/x68k/x68k/machdep.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r f5921824011a -r 0fbaf06d2900 sys/arch/x68k/x68k/machdep.c
--- a/sys/arch/x68k/x68k/machdep.c Tue Sep 15 18:38:41 2015 +0000
+++ b/sys/arch/x68k/x68k/machdep.c Wed Sep 16 05:48:52 2015 +0000
@@ -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 @@
#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 @@
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);
Home |
Main Index |
Thread Index |
Old Index