summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorskrll <skrll@NetBSD.org>2018-10-06 16:28:21 +0000
committerskrll <skrll@NetBSD.org>2018-10-06 16:28:21 +0000
commit12cee9baaccecb618109ce40897c2aafca4c8141 (patch)
treecb36ab9812bb741c9f5f90b5ae554f84fd344947 /sys/dev/fdt
parente90acb7a9832fa77a1f606b1c0bf04484abec9a5 (diff)
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.
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/fdt_subr.c8
-rw-r--r--sys/dev/fdt/files.fdt9
2 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/fdt/fdt_subr.c b/sys/dev/fdt/fdt_subr.c
index e83a807f3a0..6ebf86267ab 100644
--- a/sys/dev/fdt/fdt_subr.c
+++ b/sys/dev/fdt/fdt_subr.c
@@ -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 <jmcneill@invisible.ca>
@@ -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 index, uint64_t *paddr, uint64_t *psize)
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)
diff --git a/sys/dev/fdt/files.fdt b/sys/dev/fdt/files.fdt
index 944f9689e51..2af65b81520 100644
--- a/sys/dev/fdt/files.fdt
+++ b/sys/dev/fdt/files.fdt
@@ -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