diff options
author | 2005-10-03 19:35:46 +0000 | |
---|---|---|
committer | 2005-10-03 19:35:46 +0000 | |
commit | bc52419c65c70ba7a88e2ded35589bb5641440a7 (patch) | |
tree | 1df7e402268880b58b0394423979a4767be96500 | |
parent | Put the 970 in correct sleep mode, ok deraadt@ (diff) | |
download | wireguard-openbsd-bc52419c65c70ba7a88e2ded35589bb5641440a7.tar.xz wireguard-openbsd-bc52419c65c70ba7a88e2ded35589bb5641440a7.zip |
system_type is apple, dont act like it is any other, ok deraadt@
-rw-r--r-- | sys/arch/macppc/macppc/mainbus.c | 79 |
1 files changed, 31 insertions, 48 deletions
diff --git a/sys/arch/macppc/macppc/mainbus.c b/sys/arch/macppc/macppc/mainbus.c index cb2075b8e6a..eee05f9ec76 100644 --- a/sys/arch/macppc/macppc/mainbus.c +++ b/sys/arch/macppc/macppc/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.11 2005/09/29 20:17:34 kettenis Exp $ */ +/* $OpenBSD: mainbus.c,v 1.12 2005/10/03 19:35:46 drahn Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -73,7 +73,8 @@ mbattach(struct device *parent, struct device *self, void *aux) { struct mainbus_softc *sc = (struct mainbus_softc *)self; struct confargs nca; - extern int system_type; + char name[32]; + int node; printf("\n"); @@ -93,58 +94,40 @@ mbattach(struct device *parent, struct device *self, void *aux) config_found(self, &nca, mbprint); /* Set up Openfirmware.*/ - if (system_type != POWER4e) { /* for now */ + { /* legacy? */ nca.ca_name = "ofroot"; nca.ca_bus = &sc->sc_bus; config_found(self, &nca, mbprint); } - /* The following machines have an ISA bus */ - /* Do ISA first so the interrupt controller is set up! */ - if (system_type == POWER4e) { - nca.ca_name = "isabr"; - nca.ca_bus = &sc->sc_bus; - config_found(self, &nca, mbprint); - } - - /* The following machines have a PCI bus */ - if (system_type == APPL) { - char name[32]; - int node; - for (node = OF_child(OF_peer(0)); node; node=OF_peer(node)) { - bzero (name, sizeof(name)); - if (OF_getprop(node, "device_type", name, - sizeof(name)) <= 0) { - if (OF_getprop(node, "name", name, - sizeof(name)) <= 0) - printf ("name not found on node %x\n", - node); - continue; - } - if (strcmp(name, "memory-controller") == 0) { - nca.ca_name = "memc"; - nca.ca_node = node; - nca.ca_bus = &sc->sc_bus; - config_found(self, &nca, mbprint); - } - if (strcmp(name, "pci") == 0) { - nca.ca_name = "mpcpcibr"; - nca.ca_node = node; - nca.ca_bus = &sc->sc_bus; - config_found(self, &nca, mbprint); - } - if (strcmp(name, "ht") == 0) { - nca.ca_name = "ht"; - nca.ca_node = node; - nca.ca_bus = &sc->sc_bus; - config_found(self, &nca, mbprint); - } + for (node = OF_child(OF_peer(0)); node; node=OF_peer(node)) { + bzero (name, sizeof(name)); + if (OF_getprop(node, "device_type", name, + sizeof(name)) <= 0) { + if (OF_getprop(node, "name", name, + sizeof(name)) <= 0) + printf ("name not found on node %x\n", + node); + continue; + } + if (strcmp(name, "memory-controller") == 0) { + nca.ca_name = "memc"; + nca.ca_node = node; + nca.ca_bus = &sc->sc_bus; + config_found(self, &nca, mbprint); + } + if (strcmp(name, "pci") == 0) { + nca.ca_name = "mpcpcibr"; + nca.ca_node = node; + nca.ca_bus = &sc->sc_bus; + config_found(self, &nca, mbprint); + } + if (strcmp(name, "ht") == 0) { + nca.ca_name = "ht"; + nca.ca_node = node; + nca.ca_bus = &sc->sc_bus; + config_found(self, &nca, mbprint); } - } else if (system_type != OFWMACH) { - nca.ca_name = "mpcpcibr"; - nca.ca_bus = &sc->sc_bus; - nca.ca_node = OF_finddevice("/pci"); - config_found(self, &nca, mbprint); } } |