Module Name: src Committed By: jmcneill Date: Fri Apr 14 22:55:06 UTC 2017
Modified Files: src/sys/arch/evbarm/conf: EXYNOS TEGRA src/sys/dev/fdt: fdtbus.c files.fdt Removed Files: src/sys/dev/fdt: simplebus.c Log Message: Remove simplebus driver and allow fdtbus to attach directly to itself. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/EXYNOS \ src/sys/arch/evbarm/conf/TEGRA cvs rdiff -u -r1.5 -r1.6 src/sys/dev/fdt/fdtbus.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/fdt/files.fdt cvs rdiff -u -r1.1 -r0 src/sys/dev/fdt/simplebus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbarm/conf/EXYNOS diff -u src/sys/arch/evbarm/conf/EXYNOS:1.12 src/sys/arch/evbarm/conf/EXYNOS:1.13 --- src/sys/arch/evbarm/conf/EXYNOS:1.12 Sun Feb 19 07:47:00 2017 +++ src/sys/arch/evbarm/conf/EXYNOS Fri Apr 14 22:55:06 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: EXYNOS,v 1.12 2017/02/19 07:47:00 rin Exp $ +# $NetBSD: EXYNOS,v 1.13 2017/04/14 22:55:06 jmcneill Exp $ # # ODROID-XU -- ODROID-XU4 Exynos5422 based kernel # @@ -203,9 +203,7 @@ armgtmr0 at armperiph? # Generic Timer # On-board I/O exynosfdt0 at mainbus? -fdt0 at exynosfdt0 -simplebus* at fdt? -fdt* at simplebus? +fdt? at fdtbus? fregulator* at fdt? Index: src/sys/arch/evbarm/conf/TEGRA diff -u src/sys/arch/evbarm/conf/TEGRA:1.12 src/sys/arch/evbarm/conf/TEGRA:1.13 --- src/sys/arch/evbarm/conf/TEGRA:1.12 Tue Mar 28 15:09:29 2017 +++ src/sys/arch/evbarm/conf/TEGRA Fri Apr 14 22:55:06 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: TEGRA,v 1.12 2017/03/28 15:09:29 skrll Exp $ +# $NetBSD: TEGRA,v 1.13 2017/04/14 22:55:06 jmcneill Exp $ # # NVIDIA Tegra K1 (T124) # @@ -34,9 +34,7 @@ armgtmr0 at armperiph? # ARM Generic # On-board I/O tegrafdt0 at mainbus? -fdt0 at tegrafdt0 -simplebus* at fdt? -fdt* at simplebus? +fdt* at fdtbus? fregulator* at fdt? gpiokeys* at fdt? Index: src/sys/dev/fdt/fdtbus.c diff -u src/sys/dev/fdt/fdtbus.c:1.5 src/sys/dev/fdt/fdtbus.c:1.6 --- src/sys/dev/fdt/fdtbus.c:1.5 Thu Apr 13 22:27:07 2017 +++ src/sys/dev/fdt/fdtbus.c Fri Apr 14 22:55:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdtbus.c,v 1.5 2017/04/13 22:27:07 jmcneill Exp $ */ +/* $NetBSD: fdtbus.c,v 1.6 2017/04/14 22:55:06 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.5 2017/04/13 22:27:07 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.6 2017/04/14 22:55:06 jmcneill Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -56,11 +56,17 @@ static int fdt_match(device_t parent, cfdata_t cf, void *aux) { const struct fdt_attach_args *faa = aux; + const char * const compatible[] = { "simple-bus", NULL }; + int match; if (!OF_child(faa->faa_phandle)) return 0; - return 1; + match = of_match_compatible(faa->faa_phandle, compatible); + if (match) + return match; + + return OF_finddevice("/") == faa->faa_phandle; } static void Index: src/sys/dev/fdt/files.fdt diff -u src/sys/dev/fdt/files.fdt:1.7 src/sys/dev/fdt/files.fdt:1.8 --- src/sys/dev/fdt/files.fdt:1.7 Wed Dec 30 04:23:39 2015 +++ src/sys/dev/fdt/files.fdt Fri Apr 14 22:55:06 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.7 2015/12/30 04:23:39 marty Exp $ +# $NetBSD: files.fdt,v 1.8 2017/04/14 22:55:06 jmcneill Exp $ include "external/bsd/libfdt/conf/files.libfdt" @@ -6,14 +6,10 @@ defflag opt_fdt.h FDT: libfdt, ofw_su define fdtbus { } : clk -device fdt { } +device fdt { } : fdtbus attach fdt at fdtbus file dev/fdt/fdtbus.c fdt -device simplebus : fdtbus -attach simplebus at fdt -file dev/fdt/simplebus.c simplebus - device fregulator attach fregulator at fdt file dev/fdt/fixedregulator.c fregulator