Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/macppc/dev don't complain about mpic and dart not b...



details:   https://anonhg.NetBSD.org/src/rev/4ec3c48fb49b
branches:  trunk
changeset: 372807:4ec3c48fb49b
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Dec 28 07:18:29 2022 +0000

description:
don't complain about mpic and dart not being configured
mpic is handled elsewhere, dart is an iommu we don't use yet

diffstat:

 sys/arch/macppc/dev/uni-n.c |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r 19a158635324 -r 4ec3c48fb49b sys/arch/macppc/dev/uni-n.c
--- a/sys/arch/macppc/dev/uni-n.c       Wed Dec 28 07:12:36 2022 +0000
+++ b/sys/arch/macppc/dev/uni-n.c       Wed Dec 28 07:18:29 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uni-n.c,v 1.12 2022/01/22 11:49:16 thorpej Exp $       */
+/*     $NetBSD: uni-n.c,v 1.13 2022/12/28 07:18:29 macallan Exp $      */
 
 /*-
  * Copyright (C) 2005 Michael Lorenz.
@@ -31,7 +31,7 @@
  */
  
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uni-n.c,v 1.12 2022/01/22 11:49:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uni-n.c,v 1.13 2022/12/28 07:18:29 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,6 +63,17 @@
 static uint8_t eeprom[2][160];
 #endif
 
+static const char *skiplist[] = {
+       "openpic",
+       "chrp,open-pic",
+       "open-pic",
+       "mpic",
+       "dart",
+       "u3-dart",
+       "u4-dart",
+       NULL
+};
+
 int
 uni_n_match(device_t parent, cfdata_t cf, void *aux)
 {
@@ -108,7 +119,7 @@
 #if NFCU > 0
        /*
         * zero out eeprom blocks, then see if we have valid data
-        * doing this here because the EEPROMs are dangling from out i2c bus
+        * doing this here because the EEPROMs are dangling from our i2c bus
         * but we can get all the data just from looking at the properties
         */
        memset(eeprom, 0, sizeof(eeprom));
@@ -116,6 +127,7 @@
        OF_getprop(cpuid, "cpuid", eeprom[0], sizeof(eeprom[0]));
        if (eeprom[0][1] != 0)
                aprint_normal_dev(self, "found EEPROM data for CPU 0\n");
+
        cpuid = OF_finddevice("/u3/i2c/cpuid@a2");
        OF_getprop(cpuid, "cpuid", eeprom[1], sizeof(eeprom[1]));
        if (eeprom[1][1] != 0)
@@ -131,6 +143,7 @@
 
        devhandle_t selfh = device_handle(self);
        for (child = OF_child(node); child; child = OF_peer(child)) {
+               if (of_compatible(child, skiplist)) continue;
                namelen = OF_getprop(child, "name", name, sizeof(name));
                if (namelen < 0)
                        continue;



Home | Main Index | Thread Index | Old Index