Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Pass along our device handle to the PCI bus instanc...



details:   https://anonhg.NetBSD.org/src/rev/0003cbbc7b3e
branches:  trunk
changeset: 983249:0003cbbc7b3e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed May 12 04:07:34 2021 +0000

description:
Pass along our device handle to the PCI bus instance we attach.

diffstat:

 sys/arch/arm/broadcom/bcm2838_pcie.c |  8 +++++---
 sys/arch/arm/fdt/pcihost_fdt.c       |  8 +++++---
 sys/arch/arm/nvidia/tegra_pcie.c     |  8 +++++---
 sys/arch/arm/nxp/imxpcie.c           |  8 +++++---
 sys/arch/ofppc/pci/ofwpci.c          |  8 +++++---
 5 files changed, 25 insertions(+), 15 deletions(-)

diffs (143 lines):

diff -r 51984a665bd2 -r 0003cbbc7b3e sys/arch/arm/broadcom/bcm2838_pcie.c
--- a/sys/arch/arm/broadcom/bcm2838_pcie.c      Wed May 12 03:53:37 2021 +0000
+++ b/sys/arch/arm/broadcom/bcm2838_pcie.c      Wed May 12 04:07:34 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2838_pcie.c,v 1.3 2021/05/03 18:56:38 tnn Exp $ */
+/*     $NetBSD: bcm2838_pcie.c,v 1.4 2021/05/12 04:07:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2838_pcie.c,v 1.3 2021/05/03 18:56:38 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2838_pcie.c,v 1.4 2021/05/12 04:07:34 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -281,7 +281,9 @@
        pba.pba_pc = pc;
        pba.pba_bus = sc->sc_bus_min;
 
-       config_found(self, &pba, pcibusprint, CFARG_EOL);
+       config_found(self, &pba, pcibusprint,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
 
 static void
diff -r 51984a665bd2 -r 0003cbbc7b3e sys/arch/arm/fdt/pcihost_fdt.c
--- a/sys/arch/arm/fdt/pcihost_fdt.c    Wed May 12 03:53:37 2021 +0000
+++ b/sys/arch/arm/fdt/pcihost_fdt.c    Wed May 12 04:07:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcihost_fdt.c,v 1.24 2021/04/24 23:36:26 thorpej Exp $ */
+/* $NetBSD: pcihost_fdt.c,v 1.25 2021/05/12 04:07:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.24 2021/04/24 23:36:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.25 2021/05/12 04:07:34 thorpej Exp $");
 
 #include <sys/param.h>
 
@@ -194,7 +194,9 @@
        pba.pba_pc = &sc->sc_pc;
        pba.pba_bus = sc->sc_bus_min;
 
-       config_found(sc->sc_dev, &pba, pcibusprint, CFARG_EOL);
+       config_found(sc->sc_dev, &pba, pcibusprint,
+           CFARG_DEVHANDLE, device_handle(sc->sc_dev),
+           CFARG_EOL);
 }
 
 void
diff -r 51984a665bd2 -r 0003cbbc7b3e sys/arch/arm/nvidia/tegra_pcie.c
--- a/sys/arch/arm/nvidia/tegra_pcie.c  Wed May 12 03:53:37 2021 +0000
+++ b/sys/arch/arm/nvidia/tegra_pcie.c  Wed May 12 04:07:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pcie.c,v 1.37 2021/04/24 23:36:27 thorpej Exp $ */
+/* $NetBSD: tegra_pcie.c,v 1.38 2021/05/12 04:07:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.37 2021/04/24 23:36:27 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.38 2021/05/12 04:07:34 thorpej Exp $");
 
 #include <sys/param.h>
 
@@ -275,7 +275,9 @@
        pba.pba_pc = &sc->sc_pc;
        pba.pba_bus = 0;
 
-       config_found(self, &pba, pcibusprint, CFARG_EOL);
+       config_found(self, &pba, pcibusprint,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
 
 static int
diff -r 51984a665bd2 -r 0003cbbc7b3e sys/arch/arm/nxp/imxpcie.c
--- a/sys/arch/arm/nxp/imxpcie.c        Wed May 12 03:53:37 2021 +0000
+++ b/sys/arch/arm/nxp/imxpcie.c        Wed May 12 04:07:34 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imxpcie.c,v 1.2 2021/04/24 23:36:28 thorpej Exp $      */
+/*     $NetBSD: imxpcie.c,v 1.3 2021/05/12 04:07:34 thorpej Exp $      */
 
 /*
  * Copyright (c) 2019  Genetec Corporation.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxpcie.c,v 1.2 2021/04/24 23:36:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxpcie.c,v 1.3 2021/05/12 04:07:34 thorpej Exp $");
 
 #include "opt_pci.h"
 #include "opt_fdt.h"
@@ -509,7 +509,9 @@
        pba.pba_pc = &sc->sc_pc;
        pba.pba_bus = 0;
 
-       config_found(sc->sc_dev, &pba, pcibusprint, CFARG_EOL);
+       config_found(sc->sc_dev, &pba, pcibusprint,
+           CFARG_DEVHANDLE, device_handle(sc->sc_dev),
+           CFARG_EOL);
 }
 
 int
diff -r 51984a665bd2 -r 0003cbbc7b3e sys/arch/ofppc/pci/ofwpci.c
--- a/sys/arch/ofppc/pci/ofwpci.c       Wed May 12 03:53:37 2021 +0000
+++ b/sys/arch/ofppc/pci/ofwpci.c       Wed May 12 04:07:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwpci.c,v 1.19 2021/04/24 23:36:45 thorpej Exp $ */
+/* $NetBSD: ofwpci.c,v 1.20 2021/05/12 04:07:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwpci.c,v 1.19 2021/04/24 23:36:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwpci.c,v 1.20 2021/05/12 04:07:34 thorpej Exp $");
 
 #include "opt_pci.h"
 
@@ -228,5 +228,7 @@
        pba.pba_bridgetag = NULL;
        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, device_handle(self),
+           CFARG_EOL);
 }



Home | Main Index | Thread Index | Old Index