summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-03-13 23:03:03 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-03-13 23:03:03 +0000
commit616d4006bec7582f14ad4b61601364fafb9d8f4c (patch)
tree20ec885e9396b4fc2aa5eaec7b0ac48f5c3676d5
parent6fb02c69c24a28a80f0cbeacadc21f6631aa0416 (diff)
Attach prtc(4) if no (hardware) real-time clock was found.
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index 779b619c257..cd6362dc8fe 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.79 2008/03/08 22:53:02 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.80 2008/03/13 23:03:02 kettenis Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -61,6 +61,7 @@
#include <net/if.h>
#include <dev/cons.h>
+#include <dev/clock_subr.h>
#include <uvm/uvm_extern.h>
@@ -842,6 +843,14 @@ extern bus_space_tag_t mainbus_space_tag;
bzero(&ma, sizeof ma);
ma.ma_name = "pcons";
config_found(dev, &ma, mbprint);
+
+ extern todr_chip_handle_t todr_handle;
+
+ if (todr_handle == NULL) {
+ bzero(&ma, sizeof ma);
+ ma.ma_name = "prtc";
+ config_found(dev, &ma, mbprint);
+ }
}
struct cfattach mainbus_ca = {