summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2012-11-15 21:50:01 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2012-11-15 21:50:01 +0000
commitf0367247ce87be09db37a5bfe9223e00e635eff4 (patch)
tree14920d4605a0239093cace52d5b132b7e65bfa86 /sys/arch
parent8a8887e784346160e0aca85672ab88455381014e (diff)
Print UniNorth/U3 revision number, taken from opemfirmare, to know which
AGP chipset is present. This will help if some quirks are needed. ok mikeb@, kettenis@, miod@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/dev/uni_n.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/arch/macppc/dev/uni_n.c b/sys/arch/macppc/dev/uni_n.c
index a344a5455b1..d33fc7e3242 100644
--- a/sys/arch/macppc/dev/uni_n.c
+++ b/sys/arch/macppc/dev/uni_n.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uni_n.c,v 1.15 2006/06/19 22:41:35 miod Exp $ */
+/* $OpenBSD: uni_n.c,v 1.16 2012/11/15 21:50:00 mpi Exp $ */
/*
* Copyright (c) 1998-2001 Dale Rahn.
@@ -73,18 +73,23 @@ memcmatch(struct device *parent, void *cf, void *aux)
void
memcattach(struct device *parent, struct device *self, void *aux)
{
+ struct memc_softc *sc = (struct memc_softc *)self;
struct confargs *ca = aux;
- int len;
+ u_int32_t rev;
char name[64];
- struct memc_softc *sc = (struct memc_softc *)self;
+ int len;
- len = OF_getprop(ca->ca_node, "name", name, sizeof name);
+ len = OF_getprop(ca->ca_node, "name", name, sizeof(name));
if (len > 0)
name[len] = 0;
+ len = OF_getprop(ca->ca_node, "device-rev", &rev, sizeof(rev));
+ if (len < 0)
+ rev = 0;
+
uni_n_config(name, ca->ca_node);
- printf (": %s\n", name);
+ printf (": %s rev 0x%x\n", name, rev);
memc_attach_children(sc, ca->ca_node);
}