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 - FDT device enumeration now sets the d...



details:   https://anonhg.NetBSD.org/src/rev/72e0354a4ef4
branches:  thorpej-cfargs
changeset: 960493:72e0354a4ef4
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Apr 03 21:21:07 2021 +0000

description:
- FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.

diffstat:

 sys/arch/arm/acpi/acpi_platform.c         |   6 +---
 sys/arch/arm/altera/cycv_platform.c       |   6 +---
 sys/arch/arm/amlogic/meson_platform.c     |   8 +-----
 sys/arch/arm/broadcom/bcm283x_platform.c  |   6 +---
 sys/arch/arm/fdt/arm_platform.c           |   5 +--
 sys/arch/arm/nvidia/tegra_platform.c      |   6 +---
 sys/arch/arm/nxp/imx6_platform.c          |   6 +---
 sys/arch/arm/rockchip/rk_platform.c       |   5 +--
 sys/arch/arm/samsung/exynos_platform.c    |   5 +--
 sys/arch/arm/sunxi/sunxi_platform.c       |   6 +---
 sys/arch/arm/ti/omap3_platform.c          |   5 +--
 sys/arch/arm/vexpress/vexpress_platform.c |   5 +--
 sys/arch/arm/virt/virt_platform.c         |   5 +--
 sys/arch/arm/xilinx/zynq_platform.c       |   6 +---
 sys/dev/fdt/fdtbus.c                      |  35 ++++++++----------------------
 sys/dev/fdt/fdtvar.h                      |   3 +-
 sys/dev/ofw/ofw_subr.c                    |  12 +--------
 sys/dev/ofw/openfirm.h                    |   3 +-
 18 files changed, 42 insertions(+), 91 deletions(-)

diffs (truncated from 514 to 300 lines):

diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/acpi/acpi_platform.c
--- a/sys/arch/arm/acpi/acpi_platform.c Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/acpi/acpi_platform.c Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_platform.c,v 1.24 2021/02/12 12:26:09 jmcneill Exp $ */
+/* $NetBSD: acpi_platform.c,v 1.24.2.1 2021/04/03 21:21:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.24 2021/02/12 12:26:09 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.24.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -287,9 +287,7 @@
 static void
 acpi_platform_device_register(device_t self, void *aux)
 {
-       /* XXX Not ideal, but the only reasonable solution atm. */
        acpi_device_register(self, aux);
-       fdtbus_device_register(self, aux);
 
 #if NCOM > 0
        prop_dictionary_t prop = device_properties(self);
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/altera/cycv_platform.c
--- a/sys/arch/arm/altera/cycv_platform.c       Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/altera/cycv_platform.c       Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cycv_platform.c,v 1.17 2021/02/04 22:36:52 thorpej Exp $ */
+/* $NetBSD: cycv_platform.c,v 1.17.2.1 2021/04/03 21:21:07 thorpej Exp $ */
 
 /* This file is in the public domain. */
 
@@ -7,7 +7,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.17 2021/02/04 22:36:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.17.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 #define        _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -141,8 +141,6 @@
 {
        prop_dictionary_t dict = device_properties(dev);
 
-       fdtbus_device_register(dev, aux);
-
        if (device_is_a(dev, "arma9tmr")) {
                prop_dictionary_set_uint32(dict, "frequency",
                        cycv_clkmgr_early_get_mpu_clk() / 4);
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/amlogic/meson_platform.c
--- a/sys/arch/arm/amlogic/meson_platform.c     Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/amlogic/meson_platform.c     Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: meson_platform.c,v 1.19 2021/02/05 08:07:14 skrll Exp $ */
+/* $NetBSD: meson_platform.c,v 1.19.2.1 2021/04/03 21:21:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
 #include "arml2cc.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: meson_platform.c,v 1.19 2021/02/05 08:07:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: meson_platform.c,v 1.19.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -182,8 +182,6 @@
 {
        prop_dictionary_t dict = device_properties(self);
 
-       fdtbus_device_register(self, aux);
-
        if (device_is_a(self, "awge") && device_unit(self) == 0) {
                uint8_t enaddr[ETHER_ADDR_LEN];
                if (get_bootconf_option(boot_args, "awge0.mac-address",
@@ -234,8 +232,6 @@
        device_t parent = device_parent(self);
        char *ptr;
 
-       fdtbus_device_register(self, aux);
-
        if (device_is_a(self, "ld") &&
            device_is_a(parent, "sdmmc") &&
            (device_is_a(device_parent(parent), "mesonsdhc") ||
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/broadcom/bcm283x_platform.c
--- a/sys/arch/arm/broadcom/bcm283x_platform.c  Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/broadcom/bcm283x_platform.c  Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm283x_platform.c,v 1.47 2021/02/04 22:36:53 thorpej Exp $    */
+/*     $NetBSD: bcm283x_platform.c,v 1.47.2.1 2021/04/03 21:21:07 thorpej Exp $        */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.47 2021/02/04 22:36:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.47.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bcm283x.h"
@@ -1422,8 +1422,6 @@
 {
        prop_dictionary_t dict = device_properties(dev);
 
-       fdtbus_device_register(dev, aux);
-
        if (device_is_a(dev, "bcmdmac") &&
            vcprop_tag_success_p(&vb.vbt_dmachan.tag)) {
                prop_dictionary_set_uint32(dict,
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/fdt/arm_platform.c
--- a/sys/arch/arm/fdt/arm_platform.c   Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/fdt/arm_platform.c   Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm_platform.c,v 1.4 2021/02/04 22:36:53 thorpej Exp $ */
+/* $NetBSD: arm_platform.c,v 1.4.2.1 2021/04/03 21:21:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm_platform.c,v 1.4 2021/02/04 22:36:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm_platform.c,v 1.4.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -75,7 +75,6 @@
 static void
 arm_platform_device_register(device_t self, void *aux)
 {
-       fdtbus_device_register(self, aux);
 }
 
 static const struct pmap_devmap *
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/nvidia/tegra_platform.c
--- a/sys/arch/arm/nvidia/tegra_platform.c      Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/nvidia/tegra_platform.c      Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_platform.c,v 1.26 2021/02/04 22:36:53 thorpej Exp $ */
+/* $NetBSD: tegra_platform.c,v 1.26.2.1 2021/04/03 21:21:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -34,7 +34,7 @@
 #include "ukbd.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.26 2021/02/04 22:36:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.26.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -151,8 +151,6 @@
 {
        prop_dictionary_t dict = device_properties(self);
 
-       fdtbus_device_register(self, aux);
-
        if (device_is_a(self, "tegrafb") &&
            match_bootconf_option(boot_args, "console", "fb")) {
                prop_dictionary_set_bool(dict, "is_console", true);
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/nxp/imx6_platform.c
--- a/sys/arch/arm/nxp/imx6_platform.c  Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/nxp/imx6_platform.c  Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx6_platform.c,v 1.5 2021/02/05 08:07:14 skrll Exp $  */
+/*     $NetBSD: imx6_platform.c,v 1.5.2.1 2021/04/03 21:21:07 thorpej Exp $    */
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.5 2021/02/05 08:07:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.5.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 #include "arml2cc.h"
 #include "opt_console.h"
@@ -119,8 +119,6 @@
 {
        prop_dictionary_t prop = device_properties(self);
 
-       fdtbus_device_register(self, aux);
-
        if (device_is_a(self, "atphy")) {
                static const struct device_compatible_entry compat_data[] = {
                        { .compat = "fsl,imx6dl-sabresd" },
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/rockchip/rk_platform.c
--- a/sys/arch/arm/rockchip/rk_platform.c       Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/rockchip/rk_platform.c       Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_platform.c,v 1.11 2021/02/04 22:36:53 thorpej Exp $ */
+/* $NetBSD: rk_platform.c,v 1.11.2.1 2021/04/03 21:21:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
 #include "opt_console.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_platform.c,v 1.11 2021/02/04 22:36:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_platform.c,v 1.11.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -70,7 +70,6 @@
 static void
 rk_platform_device_register(device_t self, void *aux)
 {
-       fdtbus_device_register(self, aux);
 }
 
 static void
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/samsung/exynos_platform.c
--- a/sys/arch/arm/samsung/exynos_platform.c    Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/samsung/exynos_platform.c    Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_platform.c,v 1.37 2021/02/04 22:36:53 thorpej Exp $ */
+/* $NetBSD: exynos_platform.c,v 1.37.2.1 2021/04/03 21:21:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -35,7 +35,7 @@
 #include "ukbd.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.37 2021/02/04 22:36:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.37.2.1 2021/04/03 21:21:07 thorpej Exp $");
 
 
 /*
@@ -248,7 +248,6 @@
 static void
 exynos_platform_device_register(device_t self, void *aux)
 {
-       fdtbus_device_register(self, aux);
        exynos_device_register(self, aux);
 }
 
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/sunxi/sunxi_platform.c
--- a/sys/arch/arm/sunxi/sunxi_platform.c       Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_platform.c       Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.42 2021/02/04 22:36:53 thorpej Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.42.2.1 2021/04/03 21:21:08 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
 #include "opt_console.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.42 2021/02/04 22:36:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.42.2.1 2021/04/03 21:21:08 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -202,8 +202,6 @@
        prop_dictionary_t prop = device_properties(self);
        int val;
 
-       fdtbus_device_register(self, aux);
-
        if (device_is_a(self, "rgephy")) {
                /* Pine64+ and NanoPi NEO Plus2 gigabit ethernet workaround */
                static const struct device_compatible_entry compat_data[] = {
diff -r 3246bd378644 -r 72e0354a4ef4 sys/arch/arm/ti/omap3_platform.c
--- a/sys/arch/arm/ti/omap3_platform.c  Sat Apr 03 16:10:39 2021 +0000
+++ b/sys/arch/arm/ti/omap3_platform.c  Sat Apr 03 21:21:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap3_platform.c,v 1.6 2021/02/05 08:07:14 skrll Exp $ */
+/* $NetBSD: omap3_platform.c,v 1.6.2.1 2021/04/03 21:21:08 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_console.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap3_platform.c,v 1.6 2021/02/05 08:07:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_platform.c,v 1.6.2.1 2021/04/03 21:21:08 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -146,7 +146,6 @@
 static void
 omap3_platform_device_register(device_t self, void *aux)
 {
-       fdtbus_device_register(self, aux);



Home | Main Index | Thread Index | Old Index