summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2006-05-28 18:04:42 +0000
committerJason Wright <jason@cvs.openbsd.org>2006-05-28 18:04:42 +0000
commit3d80543fea00c028088d779f82fb47fa130c7357 (patch)
tree6880151ae63b9e3daa3ce223114c4d6511e853a8 /sys
parent0e6f507ead2e88bca99985f9d44e361db6b33f23 (diff)
- if the "upa-portid" property doesn't exist, try "portid" (schizo)
- hack enough of autoconf to get psycho and schizo working with device_register (autoconf appears to work now for schizo machines).
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index 4125e36b900..52423fffccb 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.49 2006/05/28 06:11:26 jason Exp $ */
+/* $OpenBSD: autoconf.c,v 1.50 2006/05/28 18:04:41 jason Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -1079,8 +1079,11 @@ extern bus_space_tag_t mainbus_space_tag;
ma.ma_name = buf;
ma.ma_node = node;
if (OF_getprop(node, "upa-portid", &portid, sizeof(portid)) !=
- sizeof(portid))
- portid = -1;
+ sizeof(portid)) {
+ if (OF_getprop(node, "portid", &portid,
+ sizeof(portid)) != sizeof(portid))
+ portid = -1;
+ }
ma.ma_upaid = portid;
if (getprop(node, "reg", sizeof(*ma.ma_reg),
@@ -1350,6 +1353,7 @@ static struct {
{ "mainbus", BUSCLASS_MAINBUS },
{ "upa", BUSCLASS_MAINBUS },
{ "psycho", BUSCLASS_MAINBUS },
+ { "schizo", BUSCLASS_MAINBUS },
{ "obio", BUSCLASS_OBIO },
{ "iommu", BUSCLASS_IOMMU },
{ "sbus", BUSCLASS_SBUS },
@@ -1384,6 +1388,7 @@ static const struct dev_compat_tab {
{ "SUNW,isptwo", BUSCLASS_NONE, "isp" },
{ "SUNW,fdtwo", BUSCLASS_NONE, "fdc" },
{ "pci", BUSCLASS_MAINBUS, "psycho" },
+ { "pci", BUSCLASS_MAINBUS, "schizo" },
{ "pci", BUSCLASS_PCI, "ppb" },
{ "ide", BUSCLASS_PCI, "pciide" },
{ "disk", BUSCLASS_NONE, "wd" },
@@ -1559,7 +1564,8 @@ device_register(dev, aux)
dev->dv_xname, dvname, dev->dv_xname, bpname, bp->name));
/* First, match by name */
- if (strcmp(dvname, bpname) != 0)
+ if (strcmp(dvname, bpname) != 0 &&
+ (strcmp(dvname, "schizo") != 0 || strcmp(bpname, "psycho") != 0))
return;
if (bus_class(dev) != BUSCLASS_NONE) {