Module Name: src
Committed By: skrll
Date: Sat Oct 6 16:28:21 UTC 2018
Modified Files:
src/sys/dev/fdt: fdt_subr.c files.fdt
Log Message:
Provide an FDTBASE option which allows kernels to access FDT parsing
functions without requiring full blown FDTisation.
This will be used by ODROID-C1 in move to generic start code.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/fdt/fdt_subr.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/fdt/files.fdt
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/fdt/fdt_subr.c
diff -u src/sys/dev/fdt/fdt_subr.c:1.23 src/sys/dev/fdt/fdt_subr.c:1.24
--- src/sys/dev/fdt/fdt_subr.c:1.23 Tue Jul 17 00:42:06 2018
+++ src/sys/dev/fdt/fdt_subr.c Sat Oct 6 16:28:21 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_subr.c,v 1.23 2018/07/17 00:42:06 christos Exp $ */
+/* $NetBSD: fdt_subr.c,v 1.24 2018/10/06 16:28:21 skrll Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -27,7 +27,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.23 2018/07/17 00:42:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.24 2018/10/06 16:28:21 skrll Exp $");
+
+#include "opt_fdt.h"
#include <sys/param.h>
#include <sys/bus.h>
@@ -298,6 +300,7 @@ fdtbus_get_reg64(int phandle, u_int inde
return 0;
}
+#if defined(FDT)
const struct fdt_console *
fdtbus_get_console(void)
{
@@ -323,6 +326,7 @@ fdtbus_get_console(void)
return booted_console == NULL ? NULL : booted_console->ops;
}
+#endif
const char *
fdtbus_get_stdout_path(void)
Index: src/sys/dev/fdt/files.fdt
diff -u src/sys/dev/fdt/files.fdt:1.38 src/sys/dev/fdt/files.fdt:1.39
--- src/sys/dev/fdt/files.fdt:1.38 Wed Sep 26 19:06:33 2018
+++ src/sys/dev/fdt/files.fdt Sat Oct 6 16:28:21 2018
@@ -1,8 +1,9 @@
-# $NetBSD: files.fdt,v 1.38 2018/09/26 19:06:33 jakllsch Exp $
+# $NetBSD: files.fdt,v 1.39 2018/10/06 16:28:21 skrll Exp $
include "external/bsd/libfdt/conf/files.libfdt"
-defflag opt_fdt.h FDT: libfdt, ofw_subr
+defflag opt_fdt.h FDTBASE : libfdt, ofw_subr
+defflag opt_fdt.h FDT: FDTBASE
define fdt { [pass = 10] } : clk, pwm
@@ -44,8 +45,8 @@ device panel: fdt_port
attach panel at fdt with fdt_panel
file dev/fdt/panel_fdt.c fdt_panel
-file dev/fdt/fdt_openfirm.c fdt
-file dev/fdt/fdt_subr.c fdt
+file dev/fdt/fdt_openfirm.c fdtbase
+file dev/fdt/fdt_subr.c fdtbase
file dev/fdt/fdt_clock.c fdt
file dev/fdt/fdt_dai.c fdt
file dev/fdt/fdt_dma.c fdt