summaryrefslogtreecommitdiff
path: root/sys/dev/ofw/fdt.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-07-18 09:45:00 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-07-18 09:45:00 +0000
commit5bf1d15e6ecd69d1cfb2cfab7c93470ac2ba33e4 (patch)
tree403032077be42865c2a77600e70b4f7be4dad23c /sys/dev/ofw/fdt.h
parented7746500f290113cf539d555a6a04f3ac1cf6da (diff)
Add functions to set/add properties on an FDT node.
ok visa@
Diffstat (limited to 'sys/dev/ofw/fdt.h')
-rw-r--r--sys/dev/ofw/fdt.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/ofw/fdt.h b/sys/dev/ofw/fdt.h
index 1e4263cceba..d53fd9e97f4 100644
--- a/sys/dev/ofw/fdt.h
+++ b/sys/dev/ofw/fdt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdt.h,v 1.5 2016/07/26 22:10:10 patrick Exp $ */
+/* $OpenBSD: fdt.h,v 1.6 2020/07/18 09:44:59 kettenis Exp $ */
/*
* Copyright (c) 2009 Dariusz Swiderski <sfires@sfires.net>
@@ -31,11 +31,13 @@ struct fdt_head {
struct fdt {
struct fdt_head *header;
- void * tree;
- void * strings;
- void * memory;
+ char *tree;
+ char *strings;
+ char *memory;
+ char *end;
int version;
int strings_size;
+ int struct_size;
};
struct fdt_reg {
@@ -53,12 +55,15 @@ struct fdt_reg {
#define FDT_CODE_VERSION 0x11
int fdt_init(void *);
+void fdt_finalize(void);
size_t fdt_get_size(void *);
void *fdt_next_node(void *);
void *fdt_child_node(void *);
char *fdt_node_name(void *);
void *fdt_find_node(char *);
int fdt_node_property(void *, char *, char **);
+int fdt_node_set_property(void *, char *, void *, int);
+int fdt_node_add_property(void *, char *, void *, int);
void *fdt_parent_node(void *);
void *fdt_find_phandle(uint32_t);
int fdt_get_reg(void *, int, struct fdt_reg *);