Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/fdt Attach syscon to "simple-mfd" devices and fix a ...



details:   https://anonhg.NetBSD.org/src/rev/13422d346c0b
branches:  trunk
changeset: 449192:13422d346c0b
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Feb 25 19:28:36 2019 +0000

description:
Attach syscon to "simple-mfd" devices and fix a bug with fdt_find_with_property

diffstat:

 sys/dev/fdt/fdtbus.c |  8 ++++----
 sys/dev/fdt/syscon.c |  5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (62 lines):

diff -r 477451e0afb1 -r 13422d346c0b sys/dev/fdt/fdtbus.c
--- a/sys/dev/fdt/fdtbus.c      Mon Feb 25 19:28:00 2019 +0000
+++ b/sys/dev/fdt/fdtbus.c      Mon Feb 25 19:28:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.26 2019/01/19 20:50:48 jmcneill Exp $ */
+/* $NetBSD: fdtbus.c,v 1.27 2019/02/25 19:28:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.26 2019/01/19 20:50:48 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.27 2019/02/25 19:28:36 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -79,7 +79,7 @@
 static u_int   fdt_get_order(int);
 
 static const char * const fdtbus_compatible[] =
-    { "simple-bus", "simple-mfd", NULL };
+    { "simple-bus", NULL };
 
 CFATTACH_DECL2_NEW(simplebus, sizeof(struct fdt_softc),
     fdt_match, fdt_attach, NULL, NULL, fdt_rescan, fdt_childdet);
@@ -352,7 +352,7 @@
        int index = 0;
 
        TAILQ_FOREACH(node, &fdt_nodes, n_nodes) {
-               if (index < *pindex)
+               if (index++ < *pindex)
                        continue;
                if (of_hasprop(node->n_phandle, prop)) {
                        *pindex = index;
diff -r 477451e0afb1 -r 13422d346c0b sys/dev/fdt/syscon.c
--- a/sys/dev/fdt/syscon.c      Mon Feb 25 19:28:00 2019 +0000
+++ b/sys/dev/fdt/syscon.c      Mon Feb 25 19:28:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscon.c,v 1.2 2018/06/30 16:22:56 jmcneill Exp $ */
+/* $NetBSD: syscon.c,v 1.3 2019/02/25 19:28:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscon.c,v 1.2 2018/06/30 16:22:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscon.c,v 1.3 2019/02/25 19:28:36 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -54,6 +54,7 @@
 
 static const char *compatible[] = {
        "syscon",
+       "simple-mfd",
        NULL
 };
 



Home | Main Index | Thread Index | Old Index