@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.191 2014/03/26 16:21:39 isaki Exp $ */
+/* $NetBSD: machdep.c,v 1.191.4.1 2015/11/05 20:40:22 riz 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.191.4.1 2015/11/05 20:40:22 riz 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);