summaryrefslogtreecommitdiff
path: root/sys/arch/vax
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/vax')
-rw-r--r--sys/arch/vax/include/nexus.h29
-rw-r--r--sys/arch/vax/vax/autoconf.c24
-rw-r--r--sys/arch/vax/vax/cmi.c6
-rw-r--r--sys/arch/vax/vax/ibus.c6
-rw-r--r--sys/arch/vax/vax/ka860.c6
-rw-r--r--sys/arch/vax/vax/sbi.c6
-rw-r--r--sys/arch/vax/vsa/vsbus.c11
7 files changed, 46 insertions, 42 deletions
diff --git a/sys/arch/vax/include/nexus.h b/sys/arch/vax/include/nexus.h
index 0a3c13b5ff6..0ecb9609b7c 100644
--- a/sys/arch/vax/include/nexus.h
+++ b/sys/arch/vax/include/nexus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nexus.h,v 1.10 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: nexus.h,v 1.11 2006/07/20 19:08:14 miod Exp $ */
/* $NetBSD: nexus.h,v 1.17 2000/06/04 17:58:19 ragge Exp $ */
/*-
@@ -37,20 +37,23 @@
#include <machine/bus.h>
+struct mainbus_attach_args {
+ int maa_bustype;
+};
+
/*
- * Different definitions for nicer autoconf probing.
+ * Values for bus (or pseudo-bus) types
*/
-enum bustypes {
- VAX_SBIBUS, /* SBI parent (780) */
- VAX_CMIBUS, /* CMI backplane (750) */
- VAX_UNIBUS, /* Direct backplane (730) */
- VAX_ABUS, /* SBI placeholder (8600) */
- VAX_BIBUS, /* BI bus (8200) */
- VAX_NBIBUS, /* NBI backplane (8800) */
- VAX_VSBUS, /* Virtual vaxstation bus */
- VAX_IBUS, /* Internal Microvax bus */
- VAX_XMIBUS, /* XMI master bus (6000) */
-};
+#define VAX_SBIBUS 1 /* SBI parent (780) */
+#define VAX_CMIBUS 2 /* CMI backplane (750) */
+#define VAX_UNIBUS 3 /* Direct backplane (730) */
+#define VAX_ABUS 4 /* SBI placeholder (8600) */
+#define VAX_BIBUS 5 /* BI bus (8200) */
+#define VAX_NBIBUS 6 /* NBI backplane (8800) */
+#define VAX_VSBUS 7 /* Virtual vaxstation bus */
+#define VAX_IBUS 8 /* Internal Microvax bus */
+#define VAX_XMIBUS 9 /* XMI master bus (6000) */
+
/*
* Information about nexus's.
*
diff --git a/sys/arch/vax/vax/autoconf.c b/sys/arch/vax/vax/autoconf.c
index 3b92f89460a..ea9d81d05f2 100644
--- a/sys/arch/vax/vax/autoconf.c
+++ b/sys/arch/vax/vax/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.20 2005/12/27 18:31:11 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.21 2006/07/20 19:08:15 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.45 1999/10/23 14:56:05 ragge Exp $ */
/*
@@ -52,8 +52,6 @@
#include <machine/clock.h>
#include <machine/rpb.h>
-#include "sd.h"
-#include "cd.h"
#include <vax/vax/gencons.h>
@@ -68,9 +66,6 @@ extern struct device *bootdv;
int mastercpu; /* chief of the system */
-
-#define MAINBUS 0
-
void
cpu_configure()
{
@@ -122,18 +117,19 @@ mainbus_attach(parent, self, hej)
struct device *parent, *self;
void *hej;
{
+ struct mainbus_attach_args maa;
+
printf("\n");
- /*
- * Hopefully there a master bus?
- * Maybe should have this as master instead of mainbus.
- */
- config_found(self, NULL, mainbus_print);
+ maa.maa_bustype = vax_bustype;
+ config_found(self, &maa, mainbus_print);
#if VAX53
- /* Kludge: To have two master buses */
- if (vax_boardtype == VAX_BTYP_1303)
- config_found(self, (void *)1, mainbus_print);
+ /* These models have both vsbus and ibus */
+ if (vax_boardtype == VAX_BTYP_1303) {
+ maa.maa_bustype = VAX_VSBUS;
+ config_found(self, &maa, mainbus_print);
+ }
#endif
if (dep_call->cpu_subconf)
diff --git a/sys/arch/vax/vax/cmi.c b/sys/arch/vax/vax/cmi.c
index 8cb34ca1e57..6c782679674 100644
--- a/sys/arch/vax/vax/cmi.c
+++ b/sys/arch/vax/vax/cmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmi.c,v 1.3 2002/03/14 03:16:02 millert Exp $ */
+/* $OpenBSD: cmi.c,v 1.4 2006/07/20 19:08:15 miod Exp $ */
/* $NetBSD: cmi.c,v 1.2 1999/08/14 11:30:48 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden.
@@ -69,7 +69,9 @@ cmi_match(parent, cf, aux)
struct cfdata *cf;
void *aux;
{
- if (vax_bustype == VAX_CMIBUS)
+ struct mainbus_attach_args *maa = aux;
+
+ if (maa->maa_bustype == VAX_CMIBUS)
return 1;
return 0;
}
diff --git a/sys/arch/vax/vax/ibus.c b/sys/arch/vax/vax/ibus.c
index b694175891f..cec71265928 100644
--- a/sys/arch/vax/vax/ibus.c
+++ b/sys/arch/vax/vax/ibus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ibus.c,v 1.5 2002/03/14 03:16:02 millert Exp $ */
+/* $OpenBSD: ibus.c,v 1.6 2006/07/20 19:08:15 miod Exp $ */
/* $NetBSD: ibus.c,v 1.7 2001/02/04 20:36:32 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden.
@@ -66,7 +66,9 @@ ibus_print(void *aux, const char *name)
int
ibus_match(struct device *parent, struct cfdata *cf, void *aux)
{
- if (vax_bustype == VAX_IBUS)
+ struct mainbus_attach_args *maa = aux;
+
+ if (maa->maa_bustype == VAX_IBUS)
return 1;
return 0;
}
diff --git a/sys/arch/vax/vax/ka860.c b/sys/arch/vax/vax/ka860.c
index 868cc57e35f..cb7fef88bb0 100644
--- a/sys/arch/vax/vax/ka860.c
+++ b/sys/arch/vax/vax/ka860.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ka860.c,v 1.8 2003/06/02 23:27:59 millert Exp $ */
+/* $OpenBSD: ka860.c,v 1.9 2006/07/20 19:08:15 miod Exp $ */
/* $NetBSD: ka860.c,v 1.15 1999/08/07 10:36:49 ragge Exp $ */
/*
* Copyright (c) 1986, 1988 Regents of the University of California.
@@ -350,7 +350,9 @@ abus_match(parent, cf, aux)
struct cfdata *cf;
void *aux;
{
- if (vax_bustype == VAX_ABUS)
+ struct mainbus_attach_args *maa = aux;
+
+ if (maa->maa_bustype == VAX_ABUS)
return 1;
return 0;
}
diff --git a/sys/arch/vax/vax/sbi.c b/sys/arch/vax/vax/sbi.c
index 725c2fda9b8..c3cf5953945 100644
--- a/sys/arch/vax/vax/sbi.c
+++ b/sys/arch/vax/vax/sbi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbi.c,v 1.10 2002/03/14 03:16:02 millert Exp $ */
+/* $OpenBSD: sbi.c,v 1.11 2006/07/20 19:08:15 miod Exp $ */
/* $NetBSD: sbi.c,v 1.20 1999/08/07 10:36:50 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -75,7 +75,9 @@ sbi_match(parent, cf, aux)
struct cfdata *cf;
void *aux;
{
- if (vax_bustype == VAX_SBIBUS)
+ struct mainbus_attach_args *maa = aux;
+
+ if (maa->maa_bustype == VAX_SBIBUS)
return 1;
return 0;
}
diff --git a/sys/arch/vax/vsa/vsbus.c b/sys/arch/vax/vsa/vsbus.c
index 1d4ab0daca8..fc9694319ec 100644
--- a/sys/arch/vax/vsa/vsbus.c
+++ b/sys/arch/vax/vsa/vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsbus.c,v 1.16 2006/07/16 22:40:44 miod Exp $ */
+/* $OpenBSD: vsbus.c,v 1.17 2006/07/20 19:08:15 miod Exp $ */
/* $NetBSD: vsbus.c,v 1.29 2000/06/29 07:14:37 mrg Exp $ */
/*
* Copyright (c) 1996, 1999 Ludd, University of Lule}, Sweden.
@@ -126,12 +126,9 @@ vsbus_match(parent, cf, aux)
struct cfdata *cf;
void *aux;
{
-#if VAX53
- /* Kludge: VAX53 is... special */
- if (vax_boardtype == VAX_BTYP_1303 && (int)aux == 1)
- return 1; /* Hack */
-#endif
- if (vax_bustype == VAX_VSBUS)
+ struct mainbus_attach_args *maa = aux;
+
+ if (maa->maa_bustype == VAX_VSBUS)
return 1;
return 0;
}