Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys cpus: use fdt_add_bus
details: https://anonhg.NetBSD.org/src/rev/ffbf0e2916e8
branches: trunk
changeset: 320297:ffbf0e2916e8
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jun 30 16:30:35 2018 +0000
description:
cpus: use fdt_add_bus
diffstat:
sys/arch/arm/fdt/files.fdt | 4 ++--
sys/arch/evbarm/conf/EXYNOS | 4 ++--
sys/arch/evbarm/conf/GENERIC | 4 ++--
sys/arch/evbarm/conf/GENERIC64 | 4 ++--
sys/arch/evbarm/conf/RPI | 4 ++--
sys/arch/evbarm/conf/RPI64 | 4 ++--
sys/arch/evbarm/conf/SUNXI | 4 ++--
sys/arch/evbarm/conf/TEGRA | 4 ++--
sys/arch/evbarm/conf/TI | 4 ++--
sys/arch/evbarm/conf/VEXPRESS_A15 | 4 ++--
sys/arch/evbarm/conf/VIRT | 4 ++--
sys/dev/fdt/cpus.c | 19 +++----------------
12 files changed, 25 insertions(+), 38 deletions(-)
diffs (249 lines):
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/arm/fdt/files.fdt
--- a/sys/arch/arm/fdt/files.fdt Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/arm/fdt/files.fdt Sat Jun 30 16:30:35 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.fdt,v 1.18 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: files.fdt,v 1.19 2018/06/30 16:30:35 jmcneill Exp $
include "dev/pckbport/files.pckbport"
@@ -6,7 +6,7 @@
attach armfdt at root with arm_fdt
file arch/arm/fdt/arm_fdt.c arm_fdt
-attach cpu at cpus with cpu_fdt
+attach cpu at fdt with cpu_fdt
file arch/arm/fdt/cpu_fdt.c cpu_fdt
device cpufreqdt
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/EXYNOS
--- a/sys/arch/evbarm/conf/EXYNOS Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/EXYNOS Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: EXYNOS,v 1.23 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: EXYNOS,v 1.24 2018/06/30 16:30:35 jmcneill Exp $
#
# Samsung Exynos SoC kernel
#
@@ -42,7 +42,7 @@
# CPUs
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
fclock* at fdt? pass 4
fregulator* at fdt? pass 4
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/GENERIC
--- a/sys/arch/evbarm/conf/GENERIC Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/GENERIC Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: GENERIC,v 1.2 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.3 2018/06/30 16:30:35 jmcneill Exp $
#
# GENERIC ARM (aarch32) kernel
#
@@ -58,7 +58,7 @@
# CPUs
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
# CPU frequency scaling
cpufreqdt* at cpu?
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/GENERIC64
--- a/sys/arch/evbarm/conf/GENERIC64 Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/GENERIC64 Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: GENERIC64,v 1.21 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: GENERIC64,v 1.22 2018/06/30 16:30:35 jmcneill Exp $
#
# GENERIC ARM (aarch64) kernel
#
@@ -84,7 +84,7 @@
# CPUs
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
# CPU frequency scaling
cpufreqdt* at cpu?
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/RPI
--- a/sys/arch/evbarm/conf/RPI Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/RPI Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: RPI,v 1.79 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: RPI,v 1.80 2018/06/30 16:30:35 jmcneill Exp $
#
# RPi -- Raspberry Pi
#
@@ -59,7 +59,7 @@
# The CPU(s)
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
fclock* at fdt? pass 0
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/RPI64
--- a/sys/arch/evbarm/conf/RPI64 Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/RPI64 Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: RPI64,v 1.2 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: RPI64,v 1.3 2018/06/30 16:30:35 jmcneill Exp $
#
# RPI64 - Raspberry Pi 3 and Pi 2 v1.2 in AARCH64 mode
#
@@ -65,7 +65,7 @@
# The CPU(s)
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
gtmr* at fdt? pass 1 # ARM Generic Timer
armgtmr0 at gtmr?
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/SUNXI
--- a/sys/arch/evbarm/conf/SUNXI Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/SUNXI Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: SUNXI,v 1.76 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: SUNXI,v 1.77 2018/06/30 16:30:35 jmcneill Exp $
#
# Allwinner sunxi family
#
@@ -172,7 +172,7 @@
# CPUs
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
cpufreqdt* at cpu?
# Power state coordination interface
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/TEGRA
--- a/sys/arch/evbarm/conf/TEGRA Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/TEGRA Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: TEGRA,v 1.34 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: TEGRA,v 1.35 2018/06/30 16:30:35 jmcneill Exp $
#
# NVIDIA Tegra family SoCs
#
@@ -50,7 +50,7 @@
# CPUs
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
# CPU frequency scaling
tegra124cpu* at cpu?
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/TI
--- a/sys/arch/evbarm/conf/TI Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/TI Sat Jun 30 16:30:35 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: TI,v 1.3 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: TI,v 1.4 2018/06/30 16:30:35 jmcneill Exp $
#
include "arch/evbarm/conf/std.ti"
@@ -32,7 +32,7 @@
simplebus* at fdt?
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
am3prcm* at fdt? pass 1
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/VEXPRESS_A15
--- a/sys/arch/evbarm/conf/VEXPRESS_A15 Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/VEXPRESS_A15 Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: VEXPRESS_A15,v 1.20 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: VEXPRESS_A15,v 1.21 2018/06/30 16:30:35 jmcneill Exp $
#
# ARM Versatile Express A15
#
@@ -33,7 +33,7 @@
# CPUs
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
fclock* at fdt? pass 4
fregulator* at fdt? pass 4
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/arch/evbarm/conf/VIRT
--- a/sys/arch/evbarm/conf/VIRT Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/arch/evbarm/conf/VIRT Sat Jun 30 16:30:35 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: VIRT,v 1.4 2018/06/30 16:22:56 jmcneill Exp $
+# $NetBSD: VIRT,v 1.5 2018/06/30 16:30:35 jmcneill Exp $
#
# QEMU ARM 'virt' virtual machine
#
@@ -34,7 +34,7 @@
# CPUs
cpus* at fdt? pass 0
-cpu* at cpus?
+cpu* at fdt? pass 0
fclock* at fdt? pass 4
fregulator* at fdt? pass 4
diff -r c6aed8c8710e -r ffbf0e2916e8 sys/dev/fdt/cpus.c
--- a/sys/dev/fdt/cpus.c Sat Jun 30 16:28:14 2018 +0000
+++ b/sys/dev/fdt/cpus.c Sat Jun 30 16:30:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpus.c,v 1.2 2017/06/02 00:01:00 jmcneill Exp $ */
+/* $NetBSD: cpus.c,v 1.3 2018/06/30 16:30:35 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpus.c,v 1.2 2017/06/02 00:01:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpus.c,v 1.3 2018/06/30 16:30:35 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -57,22 +57,9 @@
{
struct fdt_attach_args * const faa = aux;
const int phandle = faa->faa_phandle;
- int child;
aprint_naive("\n");
aprint_normal("\n");
- for (child = OF_child(phandle); child; child = OF_peer(child)) {
- if (!fdtbus_status_okay(child))
- continue;
-
- struct fdt_attach_args cfaa = *faa;
- cfaa.faa_phandle = child;
- cfaa.faa_name = "cpu";
- cfaa.faa_quiet = 0;
-
- device_t cpu = config_found(self, &cfaa, fdtbus_print);
- if (cpu)
- config_found(cpu, &cfaa, NULL);
- }
+ fdt_add_bus(self, phandle, faa);
}
Home |
Main Index |
Thread Index |
Old Index