Source-Changes-HG archive

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

[src/thorpej-cfargs]: src/sys/dev/ofw Associate the OpenFirmware phandle asso...



details:   https://anonhg.NetBSD.org/src/rev/ce2f77b2c1d7
branches:  thorpej-cfargs
changeset: 954305:ce2f77b2c1d7
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Apr 04 17:43:52 2021 +0000

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

diffstat:

 sys/arch/shark/ofw/ofisapc.c  |   8 +++++---
 sys/arch/shark/ofw/ofisascr.c |   8 +++++---
 sys/arch/shark/ofw/vlpci.c    |   9 ++++++---
 sys/dev/ofisa/ofisa.c         |   8 +++++---
 sys/dev/ofw/ofbus.c           |  12 ++++++++----
 5 files changed, 29 insertions(+), 16 deletions(-)

diffs (160 lines):

diff -r dea640fd6e8d -r ce2f77b2c1d7 sys/arch/shark/ofw/ofisapc.c
--- a/sys/arch/shark/ofw/ofisapc.c      Sun Apr 04 17:28:02 2021 +0000
+++ b/sys/arch/shark/ofw/ofisapc.c      Sun Apr 04 17:43:52 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofisapc.c,v 1.11.68.1 2021/03/21 21:09:07 thorpej Exp $        */
+/*     $NetBSD: ofisapc.c,v 1.11.68.2 2021/04/04 17:43:52 thorpej Exp $        */
 
 /*
  * Copyright 1997
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofisapc.c,v 1.11.68.1 2021/03/21 21:09:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofisapc.c,v 1.11.68.2 2021/04/04 17:43:52 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -120,5 +120,7 @@
 
        ia.ia_aux = (void *)oba->oba_phandle;
 
-       config_found(dev, &ia, NULL, CFARG_EOL);
+       config_found(dev, &ia, NULL,
+           CFARG_DEVHANDLE, devhandle_from_of(oba->oba_phandle),
+           CFARG_EOL);
 }
diff -r dea640fd6e8d -r ce2f77b2c1d7 sys/arch/shark/ofw/ofisascr.c
--- a/sys/arch/shark/ofw/ofisascr.c     Sun Apr 04 17:28:02 2021 +0000
+++ b/sys/arch/shark/ofw/ofisascr.c     Sun Apr 04 17:43:52 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofisascr.c,v 1.10.68.1 2021/03/21 21:09:07 thorpej Exp $       */
+/*     $NetBSD: ofisascr.c,v 1.10.68.2 2021/04/04 17:43:52 thorpej Exp $       */
 
 /*
  * Copyright 1997
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofisascr.c,v 1.10.68.1 2021/03/21 21:09:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofisascr.c,v 1.10.68.2 2021/04/04 17:43:52 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -104,5 +104,7 @@
 
        ia.ia_aux = (void *)oba->oba_phandle;
     
-       config_found(dev, &ia, NULL, CFARG_EOL);
+       config_found(dev, &ia, NULL,
+           CFARG_DEVHANDLE, devhandle_from_of(oba->oba_phandle),
+           CFARG_EOL);
 }
diff -r dea640fd6e8d -r ce2f77b2c1d7 sys/arch/shark/ofw/vlpci.c
--- a/sys/arch/shark/ofw/vlpci.c        Sun Apr 04 17:28:02 2021 +0000
+++ b/sys/arch/shark/ofw/vlpci.c        Sun Apr 04 17:43:52 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vlpci.c,v 1.10.2.1 2021/03/23 07:14:51 thorpej Exp $   */
+/*     $NetBSD: vlpci.c,v 1.10.2.2 2021/04/04 17:43:53 thorpej Exp $   */
 
 /*
  * Copyright (c) 2017 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vlpci.c,v 1.10.2.1 2021/03/23 07:14:51 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vlpci.c,v 1.10.2.2 2021/04/04 17:43:53 thorpej Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -202,6 +202,7 @@
 static void
 vlpci_attach(device_t parent, device_t self, void *aux)
 {
+       struct ofbus_attach_args * const oba = aux;
        struct vlpci_softc * const sc = device_private(self);
        pci_chipset_tag_t const pc = &sc->sc_pc;
        struct pcibus_attach_args pba;
@@ -327,7 +328,9 @@
        vlpci_dump_window(sc, VLPCI_PCI_WND_NO_2);
        vlpci_dump_window(sc, VLPCI_PCI_WND_NO_3);
 
-       config_found(self, &pba, pcibusprint, CFARG_EOL);
+       config_found(self, &pba, pcibusprint,
+           CFARG_DEVHANDLE, devhandle_from_of(oba->oba_phandle),
+           CFARG_EOL);
 }
 
 static void
diff -r dea640fd6e8d -r ce2f77b2c1d7 sys/dev/ofisa/ofisa.c
--- a/sys/dev/ofisa/ofisa.c     Sun Apr 04 17:28:02 2021 +0000
+++ b/sys/dev/ofisa/ofisa.c     Sun Apr 04 17:43:52 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofisa.c,v 1.30.2.1 2021/03/21 21:09:13 thorpej Exp $   */
+/*     $NetBSD: ofisa.c,v 1.30.2.2 2021/04/04 17:43:52 thorpej Exp $   */
 
 /*
  * Copyright 1997, 1998
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1.30.2.1 2021/03/21 21:09:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1.30.2.2 2021/04/04 17:43:52 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -131,7 +131,9 @@
                aa.dmat = iba.iba_dmat;
                aa.ic = iba.iba_ic;
 
-               config_found(self, &aa, ofisaprint, CFARG_EOL);
+               config_found(self, &aa, ofisaprint,
+                   CFARG_DEVHANDLE, devhandle_from_of(child),
+                   CFARG_EOL);
        }
 }
 
diff -r dea640fd6e8d -r ce2f77b2c1d7 sys/dev/ofw/ofbus.c
--- a/sys/dev/ofw/ofbus.c       Sun Apr 04 17:28:02 2021 +0000
+++ b/sys/dev/ofw/ofbus.c       Sun Apr 04 17:43:52 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofbus.c,v 1.26.30.1 2021/03/21 21:09:13 thorpej Exp $  */
+/*     $NetBSD: ofbus.c,v 1.26.30.2 2021/04/04 17:43:52 thorpej Exp $  */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofbus.c,v 1.26.30.1 2021/03/21 21:09:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofbus.c,v 1.26.30.2 2021/04/04 17:43:52 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -116,7 +116,9 @@
                                strlcpy(oba2.oba_ofname, name,
                                    sizeof(oba2.oba_ofname));
                        }
-                       config_found(dev, &oba2, ofbus_print, CFARG_EOL);
+                       config_found(dev, &oba2, ofbus_print,
+                           CFARG_DEVHANDLE, devhandle_from_of(child),
+                           CFARG_EOL);
                }
        }
 
@@ -141,7 +143,9 @@
                                strlcpy(oba2.oba_ofname, name,
                                    sizeof(oba2.oba_ofname));
                        }
-                       config_found(dev, &oba2, ofbus_print, CFARG_EOL);
+                       config_found(dev, &oba2, ofbus_print,
+                           CFARG_DEVHANDLE, devhandle_from_of(child),
+                           CFARG_EOL);
                }
        }
 



Home | Main Index | Thread Index | Old Index