Source-Changes-HG archive

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

[src/thorpej-cfargs]: src/sys/arch/macppc Associate the OpenFirmware phandle ...



details:   https://anonhg.NetBSD.org/src/rev/16392b0b4252
branches:  thorpej-cfargs
changeset: 981719:16392b0b4252
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Apr 04 17:28:02 2021 +0000

description:
Associate the OpenFirmware phandle associated with a found device (including
PCI bus instances) by using CFARG_DEVHANDLE.

diffstat:

 sys/arch/macppc/dev/gpio.c       |   8 +++++---
 sys/arch/macppc/dev/mediabay.c   |   5 +++--
 sys/arch/macppc/dev/obio.c       |   8 +++++---
 sys/arch/macppc/dev/smu.c        |   4 +++-
 sys/arch/macppc/dev/uni-n.c      |   8 +++++---
 sys/arch/macppc/macppc/mainbus.c |  16 +++++++++++-----
 sys/arch/macppc/pci/bandit.c     |   8 +++++---
 sys/arch/macppc/pci/grackle.c    |   8 +++++---
 sys/arch/macppc/pci/u3.c         |   7 +++++--
 sys/arch/macppc/pci/uninorth.c   |   8 +++++---
 10 files changed, 52 insertions(+), 28 deletions(-)

diffs (286 lines):

diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/dev/gpio.c
--- a/sys/arch/macppc/dev/gpio.c        Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/dev/gpio.c        Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gpio.c,v 1.13.2.1 2021/03/21 21:09:02 thorpej Exp $    */
+/*     $NetBSD: gpio.c,v 1.13.2.2 2021/04/04 17:28:02 thorpej Exp $    */
 
 /*-
  * Copyright (C) 1998  Internet Research Institute, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.13.2.1 2021/03/21 21:09:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.13.2.2 2021/04/04 17:28:02 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -119,7 +119,9 @@
                ca2.ca_reg = reg;
                ca2.ca_intr = intr;
 
-               config_found(self, &ca2, gpio_obio_print, CFARG_EOL);
+               config_found(self, &ca2, gpio_obio_print,
+                   CFARG_DEVHANDLE, devhandle_from_of(child),
+                   CFARG_EOL);
        }
 }
 
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/dev/mediabay.c
--- a/sys/arch/macppc/dev/mediabay.c    Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/dev/mediabay.c    Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mediabay.c,v 1.24.2.1 2021/03/21 21:09:02 thorpej Exp $        */
+/*     $NetBSD: mediabay.c,v 1.24.2.2 2021/04/04 17:28:02 thorpej Exp $        */
 
 /*-
  * Copyright (C) 1999 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mediabay.c,v 1.24.2.1 2021/03/21 21:09:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mediabay.c,v 1.24.2.2 2021/04/04 17:28:02 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -244,6 +244,7 @@
                ca.ca_intr = intr;
 
                content = config_found(sc->sc_dev, &ca, mediabay_print,
+                   CFARG_DEVHANDLE, devhandle_from_of(child),
                    CFARG_EOL);
                if (content) {
                        sc->sc_content = content;
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/dev/obio.c
--- a/sys/arch/macppc/dev/obio.c        Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/dev/obio.c        Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: obio.c,v 1.48.2.1 2021/03/21 21:09:02 thorpej Exp $    */
+/*     $NetBSD: obio.c,v 1.48.2.2 2021/04/04 17:28:02 thorpej Exp $    */
 
 /*-
  * Copyright (C) 1998  Internet Research Institute, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.48.2.1 2021/03/21 21:09:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.48.2.2 2021/04/04 17:28:02 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -271,7 +271,9 @@
                ca.ca_reg = reg;
                ca.ca_intr = intr;
 
-               config_found(self, &ca, obio_print, CFARG_EOL);
+               config_found(self, &ca, obio_print,
+                   CFARG_DEVHANDLE, devhandle_from_of(child),
+                   CFARG_EOL);
        }
 }
 
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/dev/smu.c
--- a/sys/arch/macppc/dev/smu.c Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/dev/smu.c Sun Apr 04 17:28:02 2021 +0000
@@ -477,7 +477,9 @@
                ca.ca_name = name;
                ca.ca_node = node;
                ca.ca_tag = i2c;
-               config_found(sc->sc_dev, &ca, smu_iicbus_print, CFARG_EOL);
+               config_found(sc->sc_dev, &ca, smu_iicbus_print,
+                   CFARG_DEVHANDLE, devhandle_from_of(node),
+                   CFARG_EOL);
 
                sc->sc_num_iicbus++;
        }
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/dev/uni-n.c
--- a/sys/arch/macppc/dev/uni-n.c       Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/dev/uni-n.c       Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uni-n.c,v 1.9.16.1 2021/03/21 21:09:02 thorpej Exp $   */
+/*     $NetBSD: uni-n.c,v 1.9.16.2 2021/04/04 17:28:02 thorpej Exp $   */
 
 /*-
  * Copyright (C) 2005 Michael Lorenz.
@@ -31,7 +31,7 @@
  */
  
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uni-n.c,v 1.9.16.1 2021/03/21 21:09:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uni-n.c,v 1.9.16.2 2021/04/04 17:28:02 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -149,7 +149,9 @@
 
                ca.ca_reg = reg;
                ca.ca_intr = intr;
-               config_found(self, &ca, uni_n_print, CFARG_EOL);
+               config_found(self, &ca, uni_n_print,
+                   CFARG_DEVHANDLE, devhandle_from_of(child),
+                   CFARG_EOL);
        }
 }
 
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/macppc/mainbus.c
--- a/sys/arch/macppc/macppc/mainbus.c  Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/macppc/mainbus.c  Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.22.10.1 2021/03/21 21:09:02 thorpej Exp $        */
+/*     $NetBSD: mainbus.c,v 1.22.10.2 2021/04/04 17:28:03 thorpej Exp $        */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.22.10.1 2021/03/21 21:09:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.22.10.2 2021/04/04 17:28:03 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -80,7 +80,9 @@
                        ca.ca_name = "cpu";
                        ca.ca_reg = reg;
                        ca.ca_nreg = OF_getprop(node, "reg", reg, sizeof(reg));
-                       config_found(self, &ca, NULL, CFARG_EOL);
+                       config_found(self, &ca, NULL,
+                           CFARG_DEVHANDLE, devhandle_from_of(node),
+                           CFARG_EOL);
                        node = OF_peer(node);
                }                       
        } else {
@@ -98,7 +100,9 @@
        if (node) {
                oba.oba_busname = "ofw";
                oba.oba_phandle = node;
-               config_found(self, &oba, NULL, CFARG_EOL);
+               config_found(self, &oba, NULL,
+                   CFARG_DEVHANDLE, devhandle_from_of(node),
+                   CFARG_EOL);
        }
 
        for (node = OF_child(OF_finddevice("/")); node; node = OF_peer(node)) {
@@ -110,7 +114,9 @@
                ca.ca_node = node;
                ca.ca_nreg = OF_getprop(node, "reg", reg, sizeof(reg));
                ca.ca_reg  = reg;
-               config_found(self, &ca, NULL, CFARG_EOL);
+               config_found(self, &ca, NULL,
+                   CFARG_DEVHANDLE, devhandle_from_of(node),
+                   CFARG_EOL);
        }
 
 #ifdef MAMBO
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/pci/bandit.c
--- a/sys/arch/macppc/pci/bandit.c      Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/pci/bandit.c      Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bandit.c,v 1.32.32.1 2021/03/23 07:14:48 thorpej Exp $ */
+/*     $NetBSD: bandit.c,v 1.32.32.2 2021/04/04 17:28:03 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1.32.32.1 2021/03/23 07:14:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1.32.32.2 2021/04/04 17:28:03 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -152,7 +152,9 @@
        pba.pba_pc = pc;
        pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY;
 
-       config_found(self, &pba, pcibusprint, CFARG_EOL);
+       config_found(self, &pba, pcibusprint,
+           CFARG_DEVHANDLE, devhandle_from_of(node),
+           CFARG_EOL);
 }
 
 static pcireg_t
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/pci/grackle.c
--- a/sys/arch/macppc/pci/grackle.c     Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/pci/grackle.c     Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grackle.c,v 1.16.32.1 2021/03/23 07:14:48 thorpej Exp $        */
+/*     $NetBSD: grackle.c,v 1.16.32.2 2021/04/04 17:28:03 thorpej Exp $        */
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grackle.c,v 1.16.32.1 2021/03/23 07:14:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grackle.c,v 1.16.32.2 2021/04/04 17:28:03 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -145,7 +145,9 @@
        pba.pba_pc = pc;
        pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY;
 
-       config_found(self, &pba, pcibusprint, CFARG_EOL);
+       config_found(self, &pba, pcibusprint,
+           CFARG_DEVHANDLE, devhandle_from_of(node),
+           CFARG_EOL);
 }
 
 static pcireg_t
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/pci/u3.c
--- a/sys/arch/macppc/pci/u3.c  Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/pci/u3.c  Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: u3.c,v 1.9.16.1 2021/03/23 07:14:48 thorpej Exp $ */
+/* $NetBSD: u3.c,v 1.9.16.2 2021/04/04 17:28:03 thorpej Exp $ */
 
 /*
  * Copyright 2006 Kyma Systems LLC.
@@ -164,7 +164,10 @@
                pba.pba_pc = pc;
                pba.pba_bus = pc->pc_bus;
                pba.pba_flags = PCI_FLAGS_MEM_OKAY | PCI_FLAGS_IO_OKAY;
-               config_found(self, &pba, pcibusprint, CFARG_EOL);
+
+               config_found(self, &pba, pcibusprint,
+                   CFARG_DEVHANDLE, devhandle_from_of(child),
+                   CFARG_EOL);
 
                pc++;
        }
diff -r 2ffb3f2cea95 -r 16392b0b4252 sys/arch/macppc/pci/uninorth.c
--- a/sys/arch/macppc/pci/uninorth.c    Sat Apr 03 21:44:40 2021 +0000
+++ b/sys/arch/macppc/pci/uninorth.c    Sun Apr 04 17:28:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uninorth.c,v 1.20.16.1 2021/03/23 07:14:48 thorpej Exp $       */
+/*     $NetBSD: uninorth.c,v 1.20.16.2 2021/04/04 17:28:03 thorpej Exp $       */
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uninorth.c,v 1.20.16.1 2021/03/23 07:14:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uninorth.c,v 1.20.16.2 2021/04/04 17:28:03 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -183,7 +183,9 @@
        pba.pba_pc = pc;
        pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY;
 
-       config_found(self, &pba, pcibusprint, CFARG_EOL);
+       config_found(self, &pba, pcibusprint,
+           CFARG_DEVHANDLE, devhandle_from_of(node),
+           CFARG_EOL);
 }
 
 static pcireg_t



Home | Main Index | Thread Index | Old Index