summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorgrr <grr@cvs.openbsd.org>1997-07-01 21:32:46 +0000
committergrr <grr@cvs.openbsd.org>1997-07-01 21:32:46 +0000
commit4baf2e1d61b5570ff1ad12415e822ea0a3d4f9f2 (patch)
treed7de23f95ae380b329d053da31c78c5321889387 /sys/arch/sparc
parentea5b52536f232eddfed655c0e5da649c69a72eda (diff)
make powerdown conditional
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/conf/files.sparc2
-rw-r--r--sys/arch/sparc/sparc/machdep.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/sparc/conf/files.sparc b/sys/arch/sparc/conf/files.sparc
index 2342e88f309..15dd29e1559 100644
--- a/sys/arch/sparc/conf/files.sparc
+++ b/sys/arch/sparc/conf/files.sparc
@@ -42,7 +42,7 @@ file arch/sparc/sparc/clock.c
device power
attach power at obio
-file arch/sparc/dev/power.c power
+file arch/sparc/dev/power.c power needs-count
device cpu
attach cpu at mainbus
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 5d458945fb6..cb2d1b8f5e8 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.25 1997/06/25 13:22:25 downsj Exp $ */
+/* $OpenBSD: machdep.c,v 1.26 1997/07/01 21:32:02 grr Exp $ */
/* $NetBSD: machdep.c,v 1.64 1996/05/19 04:12:56 mrg Exp $ */
/*
@@ -93,6 +93,7 @@
#ifdef SUN4M
#include <sparc/dev/power.h>
+#include "power.h"
#endif
vm_map_t buffer_map;
@@ -687,8 +688,12 @@ boot(howto)
doshutdownhooks();
#if defined(SUN4M)
if (howto & RB_POWERDOWN) {
+#if NPOWER > 0
printf("attempting to power down...\n");
powerdown();
+#else
+ printf("WARNING: power not configured!\n");
+#endif
}
#endif
printf("halted\n\n");