From 106a2ad5448eb38ee40861e84056db7d24089147 Mon Sep 17 00:00:00 2001 From: "Dale S. Rahn" Date: Fri, 28 Jul 2000 13:03:25 +0000 Subject: Allow device type or name to be used for locating the pci bridge. Should allow configuration of bandit in older powermac machines. --- sys/arch/powerpc/powerpc/mainbus.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/arch/powerpc/powerpc/mainbus.c b/sys/arch/powerpc/powerpc/mainbus.c index a836d5b2636..e77c63b456d 100644 --- a/sys/arch/powerpc/powerpc/mainbus.c +++ b/sys/arch/powerpc/powerpc/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.3 2000/03/20 07:05:53 rahnds Exp $ */ +/* $OpenBSD: mainbus.c,v 1.4 2000/07/28 13:03:24 rahnds Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -119,10 +119,11 @@ mbattach(parent, self, aux) int node; for (node = OF_child(OF_peer(0)); node; node= OF_peer(node)) { bzero (name, sizeof(name)); - if (OF_getprop(node, "name", name, sizeof(name)) <= 0) + if (OF_getprop(node, "device_type", name, sizeof(name)) <= 0) { - printf ("name not found on node %x\n"); - continue; + if (OF_getprop(node, "name", name, sizeof(name)) <= 0) + printf ("name not found on node %x\n"); + continue; } if (strcmp(name, "pci") == 0) { nca.ca_name = "mpcpcibr"; -- cgit v1.2.3