summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev/syscon.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-09-28 22:14:36 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-09-28 22:14:36 +0000
commitac8974a8de51edc4a7838f60167f279ffe4da0b9 (patch)
tree95026edc8f122d449b80e72d52fb684b9f5506c3 /sys/arch/mvme88k/dev/syscon.c
parent71b6b72592a47df0b36c753bb3aaa6ecf29d2cd6 (diff)
Clean various MVME188 related routines, fixing typos and removing unnecessary
diagnostic code in the process.
Diffstat (limited to 'sys/arch/mvme88k/dev/syscon.c')
-rw-r--r--sys/arch/mvme88k/dev/syscon.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/sys/arch/mvme88k/dev/syscon.c b/sys/arch/mvme88k/dev/syscon.c
index 37b4cd44939..76c7c030de3 100644
--- a/sys/arch/mvme88k/dev/syscon.c
+++ b/sys/arch/mvme88k/dev/syscon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscon.c,v 1.11 2003/06/02 07:06:56 deraadt Exp $ */
+/* $OpenBSD: syscon.c,v 1.12 2003/09/28 22:14:33 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -76,8 +76,8 @@ struct sysconsoftc {
void *sc_paddr;
struct sysconreg *sc_syscon; /* the actual registers */
struct intrhand sc_abih; /* `abort' switch */
- struct intrhand sc_acih; /* `ac fial' */
- struct intrhand sc_sfih; /* `sys fial' */
+ struct intrhand sc_acih; /* `ac fail' */
+ struct intrhand sc_sfih; /* `sys fail' */
struct intrhand sc_m188ih; /* `m188 interrupt' */
};
@@ -97,7 +97,7 @@ struct cfdriver syscon_cd = {
NULL, "syscon", DV_DULL, 0
};
-struct sysconreg *sys_syscon = NULL;
+struct sysconreg *sys_syscon;
int syscon_print(void *args, const char *bus);
int syscon_scan(struct device *parent, void *child, void *args);
@@ -111,9 +111,17 @@ sysconmatch(parent, vcf, args)
struct sysconreg *syscon;
/* Don't match if wrong cpu */
- if (brdtyp != BRD_188) return (0); /* The only one... */
- /* Uh, MVME188 better have on of these, so always match if it
- * is a MVME188... */
+ if (brdtyp != BRD_188)
+ return (0);
+
+ /* Only allow one instance */
+ if (sys_syscon != NULL)
+ return (0);
+
+ /*
+ * Uh, MVME188 better have on of these, so always match if it
+ * is a MVME188...
+ */
syscon = (struct sysconreg *)(IIOV(ca->ca_paddr));
return (1);
}
@@ -174,9 +182,6 @@ sysconattach(parent, self, args)
struct confargs *ca = args;
struct sysconsoftc *sc = (struct sysconsoftc *)self;
- if (sys_syscon)
- panic("syscon already attached!");
-
/*
* since we know ourself to land in intiobase land,
* we must adjust our address