diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-03-02 01:53:31 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-03-02 01:53:31 +0000 |
commit | 3587aa0f6a07ecdc0f8f49f63b88b67523d7673f (patch) | |
tree | 7eac8992a7a1e016d01e9a307d24631321af60c5 | |
parent | f4cffce55a7e28c102f07bddfcef33c7eef6d34f (diff) |
Support video controllers which have two outputs which in openfirmware have
two children of which the "screen" device is one. This exists on some laptop
systems.
-rw-r--r-- | sys/arch/powerpc/powerpc/ofw_machdep.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/arch/powerpc/powerpc/ofw_machdep.c b/sys/arch/powerpc/powerpc/ofw_machdep.c index c1ccc841087..bbb2a2e1c9b 100644 --- a/sys/arch/powerpc/powerpc/ofw_machdep.c +++ b/sys/arch/powerpc/powerpc/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.19 2000/10/19 03:16:16 drahn Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.20 2001/03/02 01:53:30 drahn Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -432,9 +432,18 @@ ofwconprobe() printf("\n"); len = OF_getprop(stdout_node, "assigned-addresses", addr, sizeof(addr)); - if (len < sizeof(addr[0])) { - printf(": no address\n"); - return; + if (len == -1) { + int node; + node = OF_parent(stdout_node); + len = OF_getprop(node, "name", name, 20); + name[len] = 0; + + printf("using parent %s:", name); + len = OF_getprop(node, "assigned-addresses", + addr, sizeof(addr)); + if (len < sizeof(addr[0])) { + panic(": no address\n"); + } } memtag = ofw_make_tag(NULL, pcibus(addr[0].phys_hi), pcidev(addr[0].phys_hi), @@ -472,7 +481,6 @@ ofwconprobe() &pa, pcibus(addr[1].phys_hi), pcidev(addr[1].phys_hi), pcifunc(addr[1].phys_hi)); - #if 1 for (i = 0; i < cons_linebytes * cons_height; i++) { bus_space_write_1(cons_membus, |