Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm Call acpi_device_register() / fdtbus_device_reg...
details: https://anonhg.NetBSD.org/src/rev/409a2f6fecff
branches: trunk
changeset: 980434:409a2f6fecff
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Feb 04 22:36:52 2021 +0000
description:
Call acpi_device_register() / fdtbus_device_register() as approrpriate.
diffstat:
sys/arch/arm/acpi/acpi_platform.c | 8 ++++++--
sys/arch/arm/altera/cycv_platform.c | 9 ++++++---
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 ++++--
14 files changed, 56 insertions(+), 29 deletions(-)
diffs (truncated from 388 to 300 lines):
diff -r 963f3ef17418 -r 409a2f6fecff sys/arch/arm/acpi/acpi_platform.c
--- a/sys/arch/arm/acpi/acpi_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/acpi/acpi_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_platform.c,v 1.22 2020/12/06 14:01:40 jmcneill Exp $ */
+/* $NetBSD: acpi_platform.c,v 1.23 2021/02/04 22:36:52 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.22 2020/12/06 14:01:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.23 2021/02/04 22:36:52 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -279,6 +279,10 @@
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);
ACPI_STATUS rv;
diff -r 963f3ef17418 -r 409a2f6fecff sys/arch/arm/altera/cycv_platform.c
--- a/sys/arch/arm/altera/cycv_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/altera/cycv_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cycv_platform.c,v 1.16 2021/01/29 13:10:07 rin Exp $ */
+/* $NetBSD: cycv_platform.c,v 1.17 2021/02/04 22:36:52 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.16 2021/01/29 13:10:07 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.17 2021/02/04 22:36:52 thorpej Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -137,9 +137,12 @@
}
static void
-cycv_platform_device_register(device_t dev, void *aux) {
+cycv_platform_device_register(device_t dev, void *aux)
+{
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 963f3ef17418 -r 409a2f6fecff sys/arch/arm/amlogic/meson_platform.c
--- a/sys/arch/arm/amlogic/meson_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/amlogic/meson_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: meson_platform.c,v 1.17 2021/01/29 13:10:07 rin Exp $ */
+/* $NetBSD: meson_platform.c,v 1.18 2021/02/04 22:36:53 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.17 2021/01/29 13:10:07 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: meson_platform.c,v 1.18 2021/02/04 22:36:53 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -182,6 +182,8 @@
{
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",
@@ -232,6 +234,8 @@
device_t parent = device_parent(self);
char *ptr;
+ fdtbus_device_register(dev, aux);
+
if (device_is_a(self, "ld") &&
device_is_a(parent, "sdmmc") &&
(device_is_a(device_parent(parent), "mesonsdhc") ||
diff -r 963f3ef17418 -r 409a2f6fecff sys/arch/arm/broadcom/bcm283x_platform.c
--- a/sys/arch/arm/broadcom/bcm283x_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/broadcom/bcm283x_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm283x_platform.c,v 1.46 2021/01/27 03:10:19 thorpej Exp $ */
+/* $NetBSD: bcm283x_platform.c,v 1.47 2021/02/04 22:36:53 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.46 2021/01/27 03:10:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.47 2021/02/04 22:36:53 thorpej Exp $");
#include "opt_arm_debug.h"
#include "opt_bcm283x.h"
@@ -1422,6 +1422,8 @@
{
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 963f3ef17418 -r 409a2f6fecff sys/arch/arm/fdt/arm_platform.c
--- a/sys/arch/arm/fdt/arm_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/fdt/arm_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm_platform.c,v 1.3 2020/09/28 11:54:23 jmcneill Exp $ */
+/* $NetBSD: arm_platform.c,v 1.4 2021/02/04 22:36:53 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.3 2020/09/28 11:54:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm_platform.c,v 1.4 2021/02/04 22:36:53 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -75,6 +75,7 @@
static void
arm_platform_device_register(device_t self, void *aux)
{
+ fdtbus_device_register(self, aux);
}
static const struct pmap_devmap *
diff -r 963f3ef17418 -r 409a2f6fecff sys/arch/arm/nvidia/tegra_platform.c
--- a/sys/arch/arm/nvidia/tegra_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/nvidia/tegra_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_platform.c,v 1.25 2021/01/27 03:10:19 thorpej Exp $ */
+/* $NetBSD: tegra_platform.c,v 1.26 2021/02/04 22:36:53 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.25 2021/01/27 03:10:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.26 2021/02/04 22:36:53 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -151,6 +151,8 @@
{
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 963f3ef17418 -r 409a2f6fecff sys/arch/arm/nxp/imx6_platform.c
--- a/sys/arch/arm/nxp/imx6_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/nxp/imx6_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: imx6_platform.c,v 1.3 2021/01/29 13:10:07 rin Exp $ */
+/* $NetBSD: imx6_platform.c,v 1.4 2021/02/04 22:36:53 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.3 2021/01/29 13:10:07 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.4 2021/02/04 22:36:53 thorpej Exp $");
#include "arml2cc.h"
#include "opt_console.h"
@@ -119,6 +119,8 @@
{
prop_dictionary_t prop = device_properties(self);
+ fdtbus_device_register(dev, aux);
+
if (device_is_a(self, "atphy")) {
static const struct device_compatible_entry compat_data[] = {
{ .compat = "fsl,imx6dl-sabresd" },
diff -r 963f3ef17418 -r 409a2f6fecff sys/arch/arm/rockchip/rk_platform.c
--- a/sys/arch/arm/rockchip/rk_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/rockchip/rk_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_platform.c,v 1.10 2020/09/28 11:54:23 jmcneill Exp $ */
+/* $NetBSD: rk_platform.c,v 1.11 2021/02/04 22:36:53 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.10 2020/09/28 11:54:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_platform.c,v 1.11 2021/02/04 22:36:53 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -70,6 +70,7 @@
static void
rk_platform_device_register(device_t self, void *aux)
{
+ fdtbus_device_register(self, aux);
}
static void
diff -r 963f3ef17418 -r 409a2f6fecff sys/arch/arm/samsung/exynos_platform.c
--- a/sys/arch/arm/samsung/exynos_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/samsung/exynos_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_platform.c,v 1.36 2021/01/27 03:16:37 thorpej Exp $ */
+/* $NetBSD: exynos_platform.c,v 1.37 2021/02/04 22:36:53 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.36 2021/01/27 03:16:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.37 2021/02/04 22:36:53 thorpej Exp $");
/*
@@ -248,6 +248,7 @@
static void
exynos_platform_device_register(device_t self, void *aux)
{
+ fdtbus_device_register(self, aux);
exynos_device_register(self, aux);
}
diff -r 963f3ef17418 -r 409a2f6fecff sys/arch/arm/sunxi/sunxi_platform.c
--- a/sys/arch/arm/sunxi/sunxi_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.41 2021/01/27 03:10:20 thorpej Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.42 2021/02/04 22:36:53 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.41 2021/01/27 03:10:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.42 2021/02/04 22:36:53 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -202,6 +202,8 @@
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 963f3ef17418 -r 409a2f6fecff sys/arch/arm/ti/omap3_platform.c
--- a/sys/arch/arm/ti/omap3_platform.c Thu Feb 04 22:14:08 2021 +0000
+++ b/sys/arch/arm/ti/omap3_platform.c Thu Feb 04 22:36:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap3_platform.c,v 1.4 2020/09/28 11:54:23 jmcneill Exp $ */
+/* $NetBSD: omap3_platform.c,v 1.5 2021/02/04 22:36:53 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.4 2020/09/28 11:54:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_platform.c,v 1.5 2021/02/04 22:36:53 thorpej Exp $");
#include <sys/param.h>
Home |
Main Index |
Thread Index |
Old Index