From f0367247ce87be09db37a5bfe9223e00e635eff4 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Thu, 15 Nov 2012 21:50:01 +0000 Subject: 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@ --- sys/arch/macppc/dev/uni_n.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sys/arch') 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); } -- cgit v1.2.3